-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
environment.py: concretize together by default #29942
Conversation
We have somewhat conflicting defaults, namely `view: true` and `concretization: separately`. This leads to post-install errors when merging different flavors of the same package into the default view. It makes more sense to either disable views or do consistent concretization by default. Our docs hint that `concretization: separately` is aimed at system administrators, of which there are likely fewer. By now there are likely more using environments to just build stuff, given that concretization is slow and spack.lock's are nice.
That statement surprises me. What is the context where you don't see |
concretized. *By default specs are concretized separately*, one after | ||
the other. This mode of operation permits to deploy a full | ||
software stack where multiple configurations of the same package | ||
need to be installed alongside each other. Central installations done |
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 reasoning might be poorly explained:
- We've since added stacks to support this (while that isn't specifically a problem this PR needs to address, this docs section should probably point to the section on stacks for this specific use case)
- Admins might not be the only people who benefit: there may be users who want to install separate tools in a single environment, and it may be that those tools cannot be concretized together (i.e. if each root provides a different top-level executable, but each top-level executable might depend on mutually exclusive library configurations)
Do you think it might be worth adding an option similar to --with-view
? I think it would be OK to switch the default but IMO we should provide an option so that users can control this from the command line.
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 reasoning might be poorly explained:
Sorry to clarify: I mean that the documentation, as originally written, is missing details.
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 think it should be possible to control this default with a new option --concretize-separately
(which is false by default - as desired in this PR); I think this would make it easier to maintain scripts which generate environments (when users want to concretize separately).
It also occurred to me we might want to add a temporary warning message to Environment.concretize()
when doing concretize_together
(only when it fails): right now the concretization:
choice isn't explicitly dumped into the config, so users who were depending on that behavior will see errors (but wouldn't know why that started happening).
I don't think we should introduce tons of new features and warnings, that's just overwhelming and the opposite of reducing the steep learning curve for newcomers. Alternatively and much simpler, we can make |
@tamara somehow missed your message. But I meant to say: it does not print an overview ahead of time like with a |
That sounds good to me for most cases, but my concern was with users who might be running a nightly CI script which automatically generates the environment. I think this isn't critical since they can instantiate from a simple template like:
so I could see the benefit in not adding more options to the |
adding this to v0.18.0 -- we should do something with this but whether we switch to |
This can be 0.19 earliest since it's breaking, #30038 should be 0.18 so this is less breaking. |
Closing this, will replace with a new PR that just changes the default of |
We have somewhat conflicting defaults, namely
view: true
andconcretization: separately
.This leads to post-install errors when merging different flavors of the
same package into the default view.
It makes more sense to either disable views or do consistent
concretization by default.
Our docs hint that
concretization: separately
is aimed at systemadministrators, which is likely a small percentage of spack users.
By now many people use environments to just build stuff, given that
repeated concretization is slow,
spack install x
doesn't even showwhat gets built, etc, all better when using environments. And for those
users consistent concretization makes more sense.