Skip to content

[SE-0025][SR-1275] fileprivate [1/2] #3000

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

Closed
wants to merge 1 commit into from

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Jun 13, 2016

What's in this pull request?

Implements the fileprivate access level described in SE-0025.

Resolved bug number: (SR-1275)


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

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.

@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 13, 2016

I apologize for the enormous batch of changes here. But most of it is plumbing through the new shiny.

@gribozavr
Copy link
Contributor

@swift-ci Please test

@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 13, 2016

Not sure what to do about the tests here. This is going to require submissions to SwiftPM and Foundation to migrate them to fileprivate and fix the build.

@ddunbar
Copy link
Contributor

ddunbar commented Jun 13, 2016

Would it make sense to add fileprivate as a synonym for private, so that we can stage in the changes to other projects?

@modocache
Copy link
Contributor

@ddunbar How would we disambiguate between fileprivate and private?

@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 13, 2016

The migration path here is all existing uses of private become fileprivate, so it should be a find-and-replace job to get most things to compile (if at all).

@gribozavr
Copy link
Contributor

@modocache If I understood correctly, the suggestion is that we introduce just the syntax in the first patch, thus avoiding the need for lockstep changes.

@CodaFi CodaFi force-pushed the my-fileprivate-eyes branch from 9b04220 to 053c2ad Compare June 13, 2016 17:50
@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 13, 2016

OK, the two keywords now temporarily point to the same accessibility constraint.

@CodaFi CodaFi changed the title [SE-0025][SR-1275] fileprivate [SE-0025][SR-1275] fileprivate [1/2] Jun 13, 2016
@ddunbar
Copy link
Contributor

ddunbar commented Jun 13, 2016

@swift-ci please test

@CodaFi CodaFi force-pushed the my-fileprivate-eyes branch from 053c2ad to afbc99f Compare June 13, 2016 18:34
@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 13, 2016

Once more with feeling.

@harlanhaskins
Copy link
Contributor

@swift-ci please test

The majority of changes here are just plumbing needed to get the
compiler to look at the (new!) FilePrivate as the (old!) Private and
the (new!) Private as an even more closed-off form the of (old!)
Private.

The interesting changes are in `lib/AST/NameLookup.cpp` where (new!)
private is defined as a declaration where our declcontext and their
declcontext have to match or nest.  (new!) Private predictably causes
quite a lot more dead code elimination to fire in places which has lead
to some interesting bugs that I will see about patches for (or at least
SRs).
@CodaFi CodaFi force-pushed the my-fileprivate-eyes branch from afbc99f to fb9f953 Compare June 13, 2016 20:44
@harlanhaskins
Copy link
Contributor

@swift-ci please test

@CodaFi
Copy link
Contributor Author

CodaFi commented Jun 13, 2016

OK, we've finished staging the corelibs changes for this patch (thanks @modocache for doing corelibs-XCTest). Should be smooth sailing.

@modocache
Copy link
Contributor

Looks like this branch could use a rebase.

Just curious: what's the plan for merging this? Are we waiting on something, or is this good to go?

@jrose-apple
Copy link
Contributor

@CodaFi found a problem in the proposal and we need to discuss it first.

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 7, 2016

This is now subsumed by #3391

@CodaFi CodaFi closed this Jul 7, 2016
@CodaFi CodaFi deleted the my-fileprivate-eyes branch December 22, 2019 02:58
kateinoigakukun pushed a commit to kateinoigakukun/swift that referenced this pull request Sep 5, 2021
Make versions of Yams and SAP match upstream

Versions that we currently use are old and don't support ARM64 builds on Apple Silicon.
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.

6 participants