environments: only write when necessary#13546
Merged
Conversation
5427c4d to
9cb3ba9
Compare
cab4dae to
cac913e
Compare
adamjstewart
approved these changes
Nov 3, 2019
Member
adamjstewart
left a comment
There was a problem hiding this comment.
I can confirm that this fixes #12313 for me!
tgamblin
approved these changes
Nov 3, 2019
Member
|
@becker33: this looks good to me for now. I think at a later date we should revisit the validator in |
tgamblin
pushed a commit
that referenced
this pull request
Nov 3, 2019
This changes Spack environments so that the YAML file associated with the environment is *only* written when necessary (i.e., if it is changed *by spack*). The lockfile is still written out as before. There is a larger question here of which part of Spack should be responsible for setting defaults in config files, and how we can get rid of empty lists and data structures currently cluttering files like `compilers.yaml`. But that probably requires a rework of the default-setting validator in `spack.config`, as well as the code that uses `spack.config`. This will at least help for `spack.yaml`.
This was referenced Sep 1, 2020
This file contains hidden or 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
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.
Fixes #12313
This fixes a known bug that Spack adds keys to the environment yaml for everything left empty, filling in the default values.
Will edit with issue # of the issue this fixes once I find it.