-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[bootstrap] Use separate module cache for builds #3061
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
This will ensure that multiple build jobs running in parallel on the same machine (like it could be the case in CI) do not interfere with each other. Addresses rdar://71487295
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.
Thanks! This looks good to me, but it would be good to hear what @neonichu thinks as well.
@swift-ci please smoke test |
Should the module cache directory perhaps also be a parameter to SwiftPM so that explicit flags like this don't need to be used? |
Is this a broader concern or specific to CI with |
@abertelrud I cannot offer a good opinion on your question -- I don't have a good idea on how common is to compile applications in parallel on the same machine using different Swift compilers which relies on different formats of the module cache (I can only think of this being needed in CI environments) Also I ignore if there are situations in which we use a different compiler to load the manifest (in which case the parameter could be confusing) |
@neonichu my PR is specific to Swift CI usage of Likely the same will happen with
|
For the sake of completeness, I've tried to run the tests for swiftpm with this PR -- while the compilation of the tests does not write to the default module cache, executing the tests themselves do. I would prefer to address this in a separate PR. |
Oh, I see, the issue is specific to using different compilers in parallel? That doesn't seem as if that would be something that's commonly done by users. |
Correct -- expanded the PR description to reflect this |
This will ensure that multiple build jobs running in parallel on the same machine using different Swift compilers (like it could be the case in CI) do not interfere with each other. Addresses rdar://71487295
This will ensure that multiple build jobs running in parallel on the
same machine using different Swift compilers (like it could be the case in CI) do not interfere with
each other.
Addresses rdar://71487295