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
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
a1e66a0515
swift-module-digester: diagnose value ownership changes for parameters.
2018-10-04 18:02:45 -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
c2c04875d0
swift-module-digester: diagnose operator *fix notation changes.
2018-10-02 15:04:23 -07:00
Xi Ge
784cb9e1a9
Revert "swift-module-digester: diagnose added associated types as ABI breakages even they have default type."
2018-10-02 11:12:37 -07:00
Xi Ge
a969486932
swift-module-digester: diagnose added associated types as ABI breakages even they have default type.
2018-10-01 16:00:36 -07:00
Xi Ge
8e81b59f4e
swift-module-digester: diagnose fixed-order property changes to computed property and vice versa as ABI breakage.
2018-10-01 15:54:14 -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
226811007b
swift-module-digester: refactor diagnostics logic. NFC
2018-09-29 20:18:29 -07:00
Xi Ge
e31b04495e
swift-module-digester: print node matching details in verbose mode for debugging purposes, NFC.
2018-09-28 13:50:09 -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
0afafd1ca4
swift-module-digester: diagnose let to var changes and vice versa as ABI breaking.
2018-09-27 14:25:46 -07:00
Xi Ge
c5444a8e99
swift-module-digester: diagnose optional protocol requirement changes.
2018-09-27 13:45:23 -07:00
Xi Ge
e1f4eecadb
swift-module-digester: don't diagnose new protocol requirements if they're inherited.
2018-09-25 11:12:55 -07:00
Xi Ge
2182f5301e
swift-module-digester: fix a false positive when diagnosing super class changes.
2018-09-24 17:31:13 -07:00
Xi Ge
d0cd97e3e5
swift-module-digester: diagnose any decl kind changes for nominal types.
2018-09-24 14:47:19 -07:00
Xi Ge
6e3529050d
swift-module-digester: changing super classes is API breaking.
2018-09-24 13:33:26 -07:00
Xi Ge
9db65f8527
swift-module-digester: removing super classes is API breaking.
2018-09-24 12:51:20 -07:00
Xi Ge
4e3f8f4784
swift-module-digester: added protocol requirements can be source-breaking.
2018-09-23 08:48:08 -07:00
Xi Ge
5fbecfaee6
swift-module-digester: removing setter from a subscript decl is API breaking.
2018-09-21 18:40:02 -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
565fd91a76
swift-module-digester: changing default associated type is API breaking.
2018-09-21 14:38:12 -07:00
Xi Ge
e8c604ff99
swift-module-digester: diagnose removing default associated type as API breakage.
2018-09-21 14:14:39 -07:00
Xi Ge
6500e321aa
swift-module-digester: include AssociatedTypeDecl in module digests.
2018-09-21 14:04:21 -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
f1b43ab66e
swift-module-digester: diagnose removing default argument as API breakage.
2018-09-19 17:40:00 -07:00
Xi Ge
b2a159dbf9
swift-module-digester: diagnose adding variables with fixed binary order.
...
Removing these variables should be detected as API breakages already.
2018-09-19 13:17:08 -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
47228bc17b
swift-module-digester: remove unnecessary node annotations. NFC ( #18975 )
2018-08-24 21:44:40 -07:00
Xi Ge
6adac7a1e3
DiagnosticEngine: require clients to explicitly specify source locations when emitting diagnostics. NFC ( #18962 )
2018-08-24 16:14:16 -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
Xi Ge
492a73c8e2
Merge branch 'apple-master' into api-digester-match-kind
2018-08-17 17:48:09 -07:00
Xi Ge
9138b0228b
swift-api-digester: detect type to type alias change up-front to remove bogus dignostics. rdar://43425867
2018-08-17 17:46:26 -07:00
Xi Ge
697ba85dda
swift-api-digester: add a new enum class describing why two SDKNodes are matched, NFC.
2018-08-17 17:32:55 -07:00
Xi Ge
37a7dce793
remove dead code.NFC
2018-08-17 17:00:21 -07:00
Xi Ge
c069090afe
Merge pull request #18788 from brentdax/indigestion
...
Add some proper diagnostics to the API digester
2018-08-17 15:55:51 -07:00
Jordan Rose
537954fb93
[AST] Rename several DeclContext methods to be clearer and shorter ( #18798 )
...
- getAsDeclOrDeclExtensionContext -> getAsDecl
This is basically the same as a dyn_cast, so it should use a 'getAs'
name like TypeBase does.
- getAsNominalTypeOrNominalTypeExtensionContext -> getSelfNominalTypeDecl
- getAsClassOrClassExtensionContext -> getSelfClassDecl
- getAsEnumOrEnumExtensionContext -> getSelfEnumDecl
- getAsStructOrStructExtensionContext -> getSelfStructDecl
- getAsProtocolOrProtocolExtensionContext -> getSelfProtocolDecl
- getAsTypeOrTypeExtensionContext -> getSelfTypeDecl (private)
These do /not/ return some form of 'this'; instead, they get the
extended types when 'this' is an extension. They started off life with
'is' names, which makes sense, but changed to this at some point. The
names I went with match up with getSelfInterfaceType and
getSelfTypeInContext, even though strictly speaking they're closer to
what getDeclaredInterfaceType does. But it didn't seem right to claim
that an extension "declares" the ClassDecl here.
- getAsProtocolExtensionContext -> getExtendedProtocolDecl
Like the above, this didn't return the ExtensionDecl; it returned its
extended type.
This entire commit is a mechanical change: find-and-replace, followed
by manual reformatted but no code changes.
2018-08-17 14:05:24 -07:00
Brent Royal-Gordon
004ada98bc
Add errors for other invalid strings in digester
...
Specifically, TypeAttrKinds, DeclAttrKinds, and DeclKinds.
2018-08-17 04:16:20 -07:00
Brent Royal-Gordon
8a192eaaf7
Refactor away some digester diagnostic boilerplate
2018-08-17 00:29:21 -07:00
Brent Royal-Gordon
88ac6f11a2
Add error for invalid SDKNodeKind
2018-08-17 00:27:38 -07:00
Brent Royal-Gordon
ec87277e56
Add error for unknown API KeyKind
2018-08-16 23:52:06 -07:00
Brent Royal-Gordon
fbe05ea817
Use swift::SourceManager/DiagnosticEngine
2018-08-16 23:46:35 -07:00
Brent Royal-Gordon
55d54923d4
[NFC] Move SourceMgr into SDKContext
2018-08-16 19:24:31 -07:00
Xi Ge
bc79f3011a
swift-api-digester: diagnose removal/addition of dynamic attribute under abi mode.
2018-08-16 16:50:10 -07:00