Skip to content

Conversation

@tkremenek
Copy link
Member

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

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
@tkremenek
Copy link
Member Author

@swift-ci test

@tkremenek tkremenek requested a review from jrose-apple May 9, 2018 07:21
@tkremenek
Copy link
Member Author

@jrose-apple I'm not certain what to do about the else block:

        } 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);
        }

@swift-ci
Copy link
Contributor

swift-ci commented May 9, 2018

Build failed
Swift Test Linux Platform
Git Sha - cc3024d

@swift-ci
Copy link
Contributor

swift-ci commented May 9, 2018

Build failed
Swift Test OS X Platform
Git Sha - cc3024d

Copy link
Contributor

@jrose-apple jrose-apple left a 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.

@jrose-apple
Copy link
Contributor

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.

@tkremenek
Copy link
Member Author

@swift-ci test

@tkremenek
Copy link
Member Author

@jrose-apple Can you confirm my logic for the else block is what you wanted?

@tkremenek
Copy link
Member Author

@swift-ci smoke test

@tkremenek
Copy link
Member Author

@swift-ci smoke test

1 similar comment
@tkremenek
Copy link
Member Author

@swift-ci smoke test

Copy link
Contributor

@jrose-apple jrose-apple left a 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).

@tkremenek
Copy link
Member Author

@swift-ci smoke test

@tkremenek
Copy link
Member Author

@swift-ci smoke test

@tkremenek tkremenek merged commit e9c7b1b into swiftlang:master May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants