Commit Graph

71 Commits

Author SHA1 Message Date
Xi Ge
3e00fda3e0 swift-api-digester: teach the tool to detect [String] changes to [StringRepresentable]. 2018-04-07 10:55:41 -07:00
Xi Ge
cd87f4142d swift-api-digester: add specific logic to detect optional dictionary's key changes.
We've also seen type changes in the frameworks from "[String: Any]?" to
"[StringRepresentable: Any]?". This patch adds specific logic and
attribute for this kind of change on the top of nonnull dictionary
changes.
2018-04-06 16:43:56 -07:00
Xi Ge
4705e0790c swift-api-digester: rename SDK nodes internally. NFC 2018-04-05 15:55:41 -07:00
Xi Ge
72f49e2351 swift-api-digester: separate internal and external names for node kinds. NFC 2018-04-05 15:38:17 -07:00
Xi Ge
b2c437525c swift-api-digester: teach the tool to detect [String:Any] changes to [StringRepresentable:Any].
This allows us to migrate string enum changes from the frameworks.
2018-03-26 15:35:07 -07:00
Xi Ge
f66dd8e59c swift-api-digester: keep track of type declarations with fixed layout. (#14991)
We need special logic to check abi-stability for decls with fixed
layout.
2018-03-05 15:08:06 -08:00
Xi Ge
f77b318831 swift-api-digester: teach the tool to serialize raw type name for enum declarations. 2018-03-02 17:14:36 -08:00
Xi Ge
66bb9ce4ba swift-api-digester: teach the tool to serialize conforming protocols. (#14923) 2018-03-01 15:57:59 -08:00
Xi Ge
60bd6b91e0 swift-api-digester: serialize and de-serialize whether a parameter has a default argument.
Removing default arguments can be source-breaking.
2018-02-27 13:18:58 -08:00
Xi Ge
1aa7816956 swift-api-digester: teach the tool to serialize and de-serialize generic requirements.
The tool should diagnose the change of extension's applicability since
such change can be source-breaking. We need first to support the
requirements in the module dump. Currently, we decorate each
member defined in extension with a field called extension info. The
field will keep track of the generic requirements that need to be satisfied
for this decorated member to be applicable. This patch doesn't implement the checking
of requirements change.
2018-02-23 15:30:57 -08:00
Xi Ge
87a0cfb910 swift-api-digester: teach the tool to serialize/deserialize super class Usrs. rdar://32778228
This can help us eliminate false positives when we report removed
declarations are actually moved to a newly-introduced super class.
2017-06-21 19:47:07 -07:00
David Farler
c2876dfb69 [Migrator] Migrate x.toIntMax() to Int64(x)
These protocol methods were hard-obsoleted in Swift 4.

rdar://problem/32437759
2017-06-14 14:21:51 -07:00
David Farler
970127b745 [Migrator] Add special-case migration for NSOpenGLGetVersion
This was added in the AppKit overlay as a part of general
AppKit API improvements for Swift 4.

rdar://problem/32178777
2017-06-14 14:21:50 -07:00
Xi Ge
ce17eae939 swift-api-digester: detected getter/setter function to property updates should be explicit about the new property names instead of inferring them from old function name. 2017-06-12 15:10:41 -07:00
Xi Ge
d1b0e67620 swift-api-digester: teach the tool do detect APINotes' moving one member variable/method to another type. (#9985)
Different from type hoist that moves global variables to static member
variables, we've also seen member variables being moved among different
types via apinotes. Swift-api-digester should be able to detect such
case so that migrator can handle them properly.

rdar://32466196
2017-05-30 14:23:32 -07:00
David Farler
0baa7c6dd8 [Migrator] Migrate Static member abs function calls to Swift.abs
These are deprecated in Swift 3, but are hard obsoleted in Swift 4.

rdar://problem/31070486
2017-05-14 16:55:34 -07:00
Xi Ge
ff2622734e migrator: handle the special migration cases of NSOpenGLSetOption/NSOpenGLGetOption. rdar://32178753 (#9591) 2017-05-14 13:00:03 -07:00
Xi Ge
24de53fcdf migrator: Add an API diff kind for specially handled cases. (#9585)
This item is to associate a usr with a special case Id, however, it's
up to the migrator to interpret the special case Id and apply proper
transformations.
2017-05-14 10:43:06 -07:00
Xi Ge
65b9043eb1 migrator: handle function hoist API changes and several its varieties. rdar://31234806 (#9544) 2017-05-12 21:34:06 -07:00
Xi Ge
ba33fd6236 swift-api-digester: Add a data structure APIDiffItemStore. (#8794)
This structure serves multiple purposes:
	a. Allow migrator to speak in the same language with swift-api-digester in terms of API changes.
	b. Serialize/Deserialize detected API change items in JSON format.
	c. Manage memory after deserializing API change items.
	d. Facilitate look up by USRs of APIs under migration.
The structure is tested by round-trip serialization and deserialization.
2017-04-17 13:04:02 -07:00
Xi Ge
dbb71698e9 swift-api-digester: Extract/Expose API change descriptors to libIDE to allow visibility from libMigrator. NFC (#8766) 2017-04-13 18:31:41 -07:00