Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Conversation

@jrose-apple
Copy link
Contributor

(Depends on #122; this PR is intended for just the third commit.)

Now that -fapinotes-swift-version=3 can pick up API notes for "Version: 4", the information for inactive API notes isn't sufficient to tell what would have happened under a different version. That is, I can't ask "what would happen under version 4", because I can't tell if the active annotations are active because they were specified for version 3 or version 4. The inactive, unversioned attributes were no help, either: they just said "version 0".

Fix this by adding a new flag 'IsReplacedByActive' to SwiftVersionedAttr and SwiftVersionedRemovalAttr. When set, the 'Version' field refers to the API note that caused this annotation to become inactive.

Note that "version 0" can still exist: when an attribute written in source is replaced by an unversioned attribute in the API notes.

@jrose-apple jrose-apple force-pushed the apinotes-record-replacement branch 2 times, most recently from f95fc08 to 5251264 Compare September 9, 2017 00:32
@jrose-apple
Copy link
Contributor Author

jrose-apple commented Sep 11, 2017

I think I'm going to have to make this an option, sadly, or else we're going to have a Clang/Swift revlock.

(where the Swift change is non-trivial)

@jrose-apple
Copy link
Contributor Author

…ah, well, maybe that's acceptable. update-checkout all the working copies!

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, seems reasonable.

Now that -fapinotes-swift-version=3 can pick up API notes for "Version: 4", the information for /inactive/ API notes isn't sufficient to tell what would have happened under a different version. That is, I can't ask "what would happen under version 4", because I can't tell if the active annotations are active because they were specified for version 3 or version 4. The inactive, unversioned attributes were no help, either: they just said "version 0". Fix this by adding a new flag 'IsReplacedByActive' to SwiftVersionedAttr and SwiftVersionedRemovalAttr. When set, the 'Version' field refers to the API note that caused this annotation to become inactive. Note that "version 0" can still exist: when an attribute written in source is replaced by an unversioned attribute in the API notes.
@jrose-apple jrose-apple force-pushed the apinotes-record-replacement branch from 5251264 to 79fdcc2 Compare September 15, 2017 00:07
@jrose-apple jrose-apple merged commit b9c7251 into apple:upstream-with-swift Sep 15, 2017
@jrose-apple jrose-apple deleted the apinotes-record-replacement branch September 15, 2017 00:15
jrose-apple added a commit to jrose-apple/swift-clang that referenced this pull request Sep 15, 2017
…pple#123) Now that -fapinotes-swift-version=3 can pick up API notes for "Version: 4", the information for /inactive/ API notes isn't sufficient to tell what would have happened under a different version. That is, I can't ask "what would happen under version 4", because I can't tell if the active annotations are active because they were specified for version 3 or version 4. The inactive, unversioned attributes were no help, either: they just said "version 0". Fix this by adding a new flag 'IsReplacedByActive' to SwiftVersionedAttr and SwiftVersionedRemovalAttr. When set, the 'Version' field refers to the API note that caused this annotation to become inactive. Note that "version 0" can still exist: when an attribute written in source is replaced by an unversioned attribute in the API notes. (cherry picked from commit b9c7251)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants