Xi Ge
350ed65def
swift-api-digester: simplify the API to emit diagnostics. NFC
...
All diagnostics in the abi/api checker shares empty source location
and a screening info string as the first argument. This patch
adds a new forwarding function to avoid duplicating these common
logics.
2019-03-27 14:28:41 -07:00
Harlan Haskins
081b05a4b4
[api-digester] Don’t synthesize type nodes with no public members
...
Upon seeing an extension for a type outside the current module, the digester
creates a dummy type node and puts all the extensions’ members and conformances
in that type. This allows us to track new API endpoints that are retroactively
added.
Unfortunately, if there are no public members/conformances (only internal or
private ones), the type itself ends up in the SDK dump without any public
children. This causes an issue when you dump the SDK from a parseable
interface, where the internal extension was not printed.
2019-01-30 11:45:19 -08:00
Argyrios Kyrtzidis
0413358f25
[api-digester] Don't report as API breaking when an ObjC protocol gets a new optional method
2018-11-28 11:59:20 -08:00
Xi Ge
8c0495f467
swift-module-digester: drop isSDKPrivate() from node since filtering should happen at AST level.
2018-10-25 17:41:28 -07:00
Xi Ge
49c16922dd
swift-module-digester: diagnose type witness type changes when checking ABI stability.
2018-10-25 16:40:23 -07:00
Xi Ge
da4fc05a0e
swift-module-digester: model ProcotolConformance as a standalone node.
...
Modeling ProtocolConformance as a standalone node allows us to keep
track of all type witnesses and re-use existing matching algorithm
to diagnose type witness changes.
2018-10-25 15:14:17 -07:00
Xi Ge
3f58f1e6d3
swift-module-digester: add a flag to include Swift decls specifically.
...
This flag allows us to diagnose the overlay part exclusively without digesting
the entire SDK framework.
2018-10-09 12:57:22 -07:00
Xi Ge
c8c7fb39b0
swift-module-digester: exclude fixed binary order when checking API stability.
2018-10-08 13:59:30 -07:00
Xi Ge
847aa9b327
swift-module-digester: avoid including private protocol conformances when checking API stability.
2018-10-08 13:30:30 -07:00
Xi Ge
382e27f4ab
swift-module-digester: diagnose adding/removing final as ABI/API breakages.
2018-10-08 13:19:54 -07:00
Xi Ge
bfadd46d57
swift-module-digester: diagnose non-final function changes in non-resilient classes.
2018-10-08 12:15:55 -07:00
Xi Ge
9cfc0dee79
swift-module-digester: keep track of whether a property/subscript has didSet and willSet.
2018-10-05 13:02:31 -07:00
Xi Ge
a1e66a0515
swift-module-digester: diagnose value ownership changes for parameters.
2018-10-04 18:02:45 -07:00
Xi Ge
5bab518d5f
swift-module-digester: include parameters' value ownership values in the digests.
2018-10-04 15:57:56 -07:00
Xi Ge
78271f19a0
swift-module-digester: diagnose self access kind changes for function decls.
2018-10-04 15:57:56 -07:00
Xi Ge
58b3c2173f
swift-module-digester: use getEffectiveAccess() to get accessibility when checking ABI stability.
...
This allows us to include internal decls with @usableFromInline attribute, whose stored property
changes can effect ABI.
2018-10-03 14:06:53 -07:00
Xi Ge
c2c04875d0
swift-module-digester: diagnose operator *fix notation changes.
2018-10-02 15:04:23 -07:00
Xi Ge
9fcc59bcaf
swift-module-digester: include operator declarations in the module dump.
...
Their changes should have no impact on ABI, but can be source-breaking.
2018-10-01 12:28:54 -07:00
Xi Ge
6a198b151a
swift-module-digester: keep track of whether a decl is internal.
2018-09-30 18:53:35 -07:00
Xi Ge
226811007b
swift-module-digester: refactor diagnostics logic. NFC
2018-09-29 20:18:29 -07:00
Xi Ge
b9c1cdefed
swift-module-digester: keep track of whether a property or subscript has storage.
2018-09-28 11:36:36 -07:00
Xi Ge
459538f49a
swift-module-digester: slight performance enhancement to re-use node comparison results. NFC
2018-09-28 11:05:57 -07:00
Xi Ge
7b45ae9135
swift-module-digester: diagnose adding/removing @escaping as ABI breakage.
2018-09-27 17:43:02 -07:00
Xi Ge
6665b56e9d
swift-module-digester: changing open class members to public can be source-breaking.
2018-09-27 14:38:59 -07:00
Xi Ge
c5444a8e99
swift-module-digester: diagnose optional protocol requirement changes.
2018-09-27 13:45:23 -07:00
Xi Ge
3dfe615d27
swift-module-digester: keep track of whether a class member is open.
2018-09-27 13:18:11 -07:00
Xi Ge
aa1ae1607a
swift-module-digester: keep track of whether a VarDecl is let.
2018-09-27 12:52:58 -07:00
Xi Ge
de05cbc350
swift-module-digester: more refactoring to exclude empty values in the dump.
2018-09-27 11:34:56 -07:00
Xi Ge
aaffbd1ca5
swift-module-digester: some refactoring on node serialization. NFC
2018-09-26 15:17:25 -07:00
Xi Ge
d26883a8ca
swift-module-digester: remove some boiler-template code for node serialization. NFC
2018-09-25 17:29:33 -07:00
Xi Ge
c0556cc4dd
swift-module-digester: keep track of whether a decl overrides in the dump.
2018-09-25 11:04:55 -07:00
Xi Ge
0d9f92b1a7
swift-module-digester: include the entire class inheritance chain in module dump.
2018-09-24 16:56:10 -07:00
Xi Ge
2909c222dc
swift-module-digester: keep track of super class names in the module dump
2018-09-24 12:33:33 -07:00
Xi Ge
721182dd87
swift-module-digester: refactor all node creation functions into SwiftDeclCollector. NFC
2018-09-24 12:18:12 -07:00
Xi Ge
a64ae05454
swift-module-digester: keep track of whether a protocol member is a requirement.
2018-09-23 08:25:07 -07:00
Xi Ge
f72620c3b7
swift-module-digester: removing setter from a property is API breaking.
2018-09-21 18:25:12 -07:00
Xi Ge
01afc3395e
swift-module-digester: include SubscriptDecl in the Json dump.
...
We model SubscriptDecl as an abstract function decl with a flag indicating
whether setter is defined.
2018-09-21 17:00:52 -07:00
Xi Ge
6500e321aa
swift-module-digester: include AssociatedTypeDecl in module digests.
2018-09-21 14:04:21 -07:00
Xi Ge
6cc5855bcf
swift-module-digester: when we have multiple extensions to a single external type, we should synthesize only one type decl node.
2018-09-20 16:13:40 -07:00
Xi Ge
08c8cf14e5
swift-module-digester: diagnose adding/removing protocol conformances as API breakages.
2018-09-20 15:24:19 -07:00
Xi Ge
05e15927a3
swift-module-digester: diagnose reordering of members in a fixed layout type under ABI mode.
2018-09-19 09:36:09 -07:00
Xi Ge
0eb756f2f4
swift-module-digester: serialize whether a declaration is implicit.
2018-09-18 12:59:16 -07:00
Xi Ge
47228bc17b
swift-module-digester: remove unnecessary node annotations. NFC ( #18975 )
2018-08-24 21:44:40 -07:00
Xi Ge
e4388af6be
swift-module-digester: refactor the ABI/API diagnostics to use DiagnosticEngine. NFC ( #18957 )
...
Before this patch, we used to define tooling-specific diagnostics. With adding more
checking logics, we found this mechanism hard to extend. This patch
eliminates the home-made diagnostics model to use the one from compiler, which provides
several benefits: less boiler-templates, better integration with DiagnosticConsumer,
and easy ordering of detected issues.
2018-08-24 13:11:32 -07:00
Xi Ge
1b601f83fe
swift-module-differ: refactor node definition to a separate file. NFC
...
The original implementation file contains both nodes definition and detection
logics. This patch splits the two parts.
2018-08-20 13:16:57 -07:00