-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CMake] Unbreak minimal Swift builds #36841
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
@swift-ci please test |
Build failed |
Actually, this doesn't fix the test suite. I think the "right" fix is a CMake generated header file. |
Build failed |
@swift-ci please clean test |
Build failed |
Build failed |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@swift-ci please smoke test linux |
Hi @DougGregor – What's the plan here? I see that the original pull request has been reverted but I'd imagine that you plan a second attempt at default importing the concurrency module, right? |
Rebased on top of @DougGregor's second attempt. @swift-ci please smoke test |
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.
This approach looks good! My apologies for breaking the minimal build
@@ -274,7 +274,8 @@ namespace swift { | |||
bool EnableInferPublicSendable = false; | |||
|
|||
/// Disable the implicit import of the _Concurrency module. | |||
bool DisableImplicitConcurrencyModuleImport = false; | |||
bool DisableImplicitConcurrencyModuleImport = | |||
!SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY; |
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.
Would it be easier to check SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY
in shouldImportConcurrencyByDefault
where we make the decision?
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.
I don't think it would be easier, and adjusting it in LangOpts makes the default match the build setup. Otherwise, I don't have a strong opinion about this. If people want to debate this in a subsequent pull request, that seems fine. I just want to unbreak minimum dependency builds.
For various reasons, it can be useful/interesting to create builds of Swift that minimize dependencies. Let's try to keep that working as long as we can.
@swift-ci please smoke test |
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.
LGTM.
What is the rhyme and reason behind which tests get the -disable-implicit-concurrency-module-import
? Is that just to ensure that this works correctly, or were those tests giving you trouble?
If concurrency is not essential to the test, then it's better to disable it to improve testing coverage on configurations with concurrency disabled. |
For various reasons, it can be useful/interesting to create builds of Swift that minimize dependencies. Let's try to keep that working as long as we can.