Skip to content

Conversation

@jrose-apple
Copy link
Contributor

As @parkera puts it, in the end we wound up with more Foundation declarations imported as members or keeping "NS" than those that dropped it, and any further decisions will be made on a case-by-case basis. Move all of the existing cases of prefix-stripping into Foundation's API notes and drop the logic from the compiler.

Tested by dumping the generated interface for Foundation and its submodules for both macOS and the iOS simulator, and comparing the results. A few cases did slip through here because of the interaction between SwiftName and Availability: nonswift.

rdar://problem/26880017


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

A smoke test on macOS does the following:

  1. Builds the compiler incrementally.
  2. Builds the standard library only for macOS. Simulator standard libraries and
    device standard libraries are not built.
  3. lldb is not built.
  4. The test and validation-test targets are run only for macOS. The optimized
    version of these tests are not run.

A smoke test on Linux does the following:

  1. Builds the compiler incrementally.
  2. Builds the standard library incrementally.
  3. lldb is built incrementally.
  4. The swift test and validation-test targets are run. The optimized version of these
    tests are not run.
  5. lldb is tested.

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@jrose-apple
Copy link
Contributor Author

@DougGregor, mind checking the compiler parts of this?

@swift-ci Please test OS X platform

@parkera
Copy link
Contributor

parkera commented Jul 30, 2016

Cool.

@DougGregor
Copy link
Member

Compiler bits look great, thanks @jrose-apple !

As Tony puts it, in the end we wound up with more Foundation
declarations imported as members or keeping "NS" than those that
dropped it, and any further decisions will be made on a case-by-case
basis. Move all of the existing cases of prefix-stripping into
Foundation's API notes and drop the logic from the compiler.

Tested by dumping the generated interface for Foundation and its
submodules for both macOS and the iOS simulator, and comparing the
results. A few cases did slip through here because of the interaction
between "SwiftName" and "Availability: nonswift".

The next commit will re-add "NS" to some stragglers that we missed.

rdar://problem/26880017
NSKeyedUnarchiverDelegate
NSKeyedArchiverDelegate
NSTextCheckingTypes
NSBinarySearchingOptions
NSEnumerationOptions
NSSortOptions

More rdar://problem/26880017
No change observed in the generated interface of Foundation and its
submodules.

Finishes rdar://problem/26880017.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test OS X platform

@jrose-apple
Copy link
Contributor Author

Over to Ted to merge. We only ever stripped from modules named "ObjectiveC" and "Foundation", so this should have no effect on Linux.

@tkremenek tkremenek merged commit b5aca66 into swiftlang:master Aug 2, 2016
@jrose-apple jrose-apple deleted the stop-drop-ns branch August 2, 2016 04:37
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.

4 participants