Skip to content

PackageDescription: mark imports as implementation-only #3228

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

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

egorzhdan
Copy link
Contributor

Motivation:

Symbols from Glibc/Darwin/ucrt are not used in the public interface of PackageDescription, so there is no need to expose them in the generated module interface.

Modifications:

This change hides the import statements from the generated PackageDescription module interface.
It relies on swiftlang/swift#35575 (already merged).

Result:

After this change SourceKit returns a PackageDescription interface without import Darwin.C/import Glibc/import ucrt.

`Glibc`/`Darwin`/`ucrt` imports are not used in the public interface of `PackageDescription`, so there is no need to expose them.

This change hides the import statements from the generated `PackageDescription` module interface.
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented Jan 28, 2021

seems reasonable to me. @abertelrud @compnerd ?

@abertelrud
Copy link
Contributor

Looks good to me as well. I don't think these were intended to be exposed. Thanks @egorzhdan!

@abertelrud
Copy link
Contributor

Would be interested in @compnerd's opinion too.

@abertelrud
Copy link
Contributor

Looks good to me as well. I don't think these were intended to be exposed. Thanks @egorzhdan!

Ah, and of course, when they were added, I don't think implemenation-only existed yet.

@abertelrud abertelrud requested a review from compnerd February 1, 2021 20:52
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Seems reasonable. I don't think that very many people would be relying on the implicit usability of those interfaces.

@compnerd compnerd merged commit 76f17f1 into swiftlang:main Feb 2, 2021
@egorzhdan egorzhdan deleted the pd-impl-only branch February 12, 2021 19:16
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.

5 participants