-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Swift 4.x (x < 2) names are obsoleted in 4.2, not 5. #16468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In APINotes, when an unversioned name overrides a previously declared name with a Swift version, if the previously declared name is guarded under version 4 the obsoleted version should be 4.2, not 5. In all other cases, the obsoleted version is the next major Swift version. Fixes rdar://problem/39950937
|
@swift-ci test |
|
@jrose-apple I'm not certain what to do about the } else {
// Future names are introduced in their future version.
assert(getVersion() > getActiveSwiftVersion());
attr = new (ctx) AvailableAttr(
SourceLoc(), SourceRange(), PlatformKind::none,
/*Message*/StringRef(), ctx.AllocateCopy(renamed.str()),
/*Introduced*/clang::VersionTuple(majorVersion), SourceRange(),
/*Deprecated*/clang::VersionTuple(), SourceRange(),
/*Obsoleted*/clang::VersionTuple(), SourceRange(),
PlatformAgnosticAvailabilityKind::SwiftVersionSpecific,
/*Implicit*/false);
} |
|
Build failed |
|
Build failed |
jrose-apple
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof, right, that makes sense. Thanks, Ted.
|
I think the else-block should preserve the minor version number iff it's 4.2. Another hardcoding, but it doesn't really make the problem worse. |
|
@swift-ci test |
|
@jrose-apple Can you confirm my logic for the |
|
@swift-ci smoke test |
|
@swift-ci smoke test |
1 similar comment
|
@swift-ci smoke test |
jrose-apple
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this looks fine (as far as hardcoding goes).
|
@swift-ci smoke test |
|
@swift-ci smoke test |
In APINotes, when an unversioned name overrides a previously declared name with a Swift version, if the
previously declared name is guarded under version 4 the obsoleted version should be 4.2, not 5. In all other cases, the obsoleted version is the next major Swift version.
Fixes rdar://problem/39950937