-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow a custom manifest loader to provide custom environment variables #3659
Merged
abertelrud
merged 3 commits into
swiftlang:main
from
abertelrud:eng/manifest-loader-improvements
Aug 18, 2021
Merged
Allow a custom manifest loader to provide custom environment variables #3659
abertelrud
merged 3 commits into
swiftlang:main
from
abertelrud:eng/manifest-loader-improvements
Aug 18, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abertelrud
requested review from
friedbunny,
neonichu and
tomerd
as code owners
August 10, 2021 21:25
abertelrud
commented
Aug 10, 2021
abertelrud
commented
Aug 10, 2021
@swift-ci please smoke test |
Marking as draft until I can rework it, since #3656 has changed a lot of what this is based on. |
…g a sorted dictionary.
…r customization of a single property of an already existing toolchain. It is already a struct, so the whole struct can be either mutable or immutable based on use.
abertelrud
force-pushed
the
eng/manifest-loader-improvements
branch
from
August 18, 2021 00:51
cb592f5
to
54254d7
Compare
@swift-ci please smoke test |
abertelrud
added
the
ready
Author believes the PR is ready to be merged & any feedback has been addressed
label
Aug 18, 2021
abertelrud
added
ready
Author believes the PR is ready to be merged & any feedback has been addressed
and removed
ready
Author believes the PR is ready to be merged & any feedback has been addressed
labels
Aug 18, 2021
@swift-ci please smoke test |
… plugin compilation It defaults to `ProcessEnv.vars` so that there is no change in semantics unless the client code customizes the environment.
abertelrud
force-pushed
the
eng/manifest-loader-improvements
branch
from
August 18, 2021 04:33
5ef5879
to
c2296e4
Compare
@swift-ci please smoke test |
This is now ready to be merged once it has been reviewed. |
tomerd
approved these changes
Aug 18, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extend
ToolchainConfiguration
to allow a customization of the environment used when compiling package manifests.Motivation:
Clients of libSwiftPM can already provide a set of custom flags to pass to the Swift compiler when compiling and linking the manifest. This extends this support to allow custom environment entries as well. There's no immediate use for this in SwiftPM, but it could be used in the future, and there are clients that want to do so
Modifications:
ToolchainConfiguration
that contains a string-to-string mappingProcessEnv.vars
to maintain status quo — this happens to not be needed on Darwin but is needed on LinuxA separate but related change (in a separate commit) is to make the properties of
ToolchainConfiguration
be mutable, so that clients can useToolchainConfiguration.default
and then mutate a single property without having to instantiate a new struct and pass all the properties fromToolchainConfigratuion.default
.Result:
Clients of libSwiftPM can customize the environment used when compiling package manifests.