This replaces the `process_fine_grained_swiftdeps_with_fingerprints`
helper with a python script that mimics the shell behaviour. Adjust the
generated interface diffs to use unified formats. This allows us to
enable these tests on Windows.
We're seeing some flakiness in this test, but aren't sure what it's
complaining about. `cmp` only says where the differencewas, but doesn't
print what was different. `diff` prints what was difference so we have a
chance to figure out what happened.
For example, given:
class C: P {
func foo() {}
}
For the outer context (i.e. source file), the interface hash shoule be
'class C : P { }' for the member list, it's '{ func foo ( ) { } }'.
This must be the same regardless delayed parsing is enabled.
Ensure that we use the correct python to run the python based tools.
This also allows these tools to run on Windows which will not
necessarily associate the python script with an interpreter (python).
We'd really like to say that private decls can't affect other files,
but we don't have enough information at parse-time:
- Private members of non-private classes still show up in vtables,
which affects subclasses and callers in other files.
- Private stored properties of non-private structs change the
layout of the struct.
- Private types may be used in private stored properties, affecting
the layout of the containing struct.
- Private decls of /any kind/ can be used as the initial value of a
stored property without an explicit type.
private class Evil {
class func defaultAlignment() -> Alignment { return .evil }
}
public struct Character {
// Inferred type here!
private var alignment = Evil.defaultAlignment()
}
To be safe and correct, go back to only ignoring method bodies.
https://bugs.swift.org/browse/SR-1030
<rdar://problem/22856386> Changing a private stored property (in a
struct or class) or a private method (in a class) /should/ force other
files to recompile
Swift SVN r32239
After parsing a private decl, reset the token hash state to what it was
before the decl was parsed. This way, adding a private decl or editing
its type or name will not trigger a rebuild of downstream files.
<rdar://problem/22239821> Modifying private APIs shouldn't cause dependents to recompile
Swift SVN r31358
Compute the hash of all interface tokens when parsing; write the
interface hash to the swiftdeps file, or if the -dump-interface-hash
option is passed to the frontend. This hash will be used in incremental
mode to determine whether a file's interface has changed, and therefore
whether dependent files need to be rebuilt in response to the change.
Committed on ChrisW's behalf while he gets his setup unborked.
rdar://problem/15352929
Swift SVN r30477