-
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
Deprecate spack:concretization
over concretizer:unify
#30038
Deprecate spack:concretization
over concretizer:unify
#30038
Conversation
cfa766b
to
4572964
Compare
4572964
to
f3d0666
Compare
…ck:concretizer:reuse
f3d0666
to
9a2b651
Compare
spack:concretization
over concretizer:unify
6ad2049
to
d16ea02
Compare
After this PR: $ cat spack.yaml
spack:
specs:
- zlib
view: true
concretization: separately $ spack -e . concretize -f
==> Warning: concretization:separately is deprecated and will be removed in Spack 0.19 in favor of the new concretizer:unify:false config option.
==> Starting concretization
==> Environment concretized in 1.14 seconds.
==> Concretized zlib
[+] hort4xo zlib@1.2.12%clang@11.0.0+optimize+pic+shared arch=linux-ubuntu20.04-zen2
==> Warning: The environment "/tmp/tmp.2oLRDN70cu" is written to disk in a deprecated format. Please update it using:
spack env update /tmp/tmp.2oLRDN70cu
Note that versions of Spack older than 0.18 may not be able to use the updated configuration. $ ls
spack.lock spack.yaml $ spack -e . find
==> Warning: concretization:separately is deprecated and will be removed in Spack 0.19 in favor of the new concretizer:unify:false config option.
==> In environment /tmp/tmp.2oLRDN70cu
==> Root specs
zlib
==> 1 installed package
-- linux-ubuntu20.04-zen2 / clang@11.0.0 ------------------------
zlib@1.2.12 $ spack env update .
==> The environment "." is going to be updated to the latest schema format.
If the environment is updated, versions of Spack that are older than this version may not be able to read it. Spack stores backups of the updated environment which can be retrieved with "spack env revert"
==> Do you want to proceed? [y/N] y
==> Environment "." has been updated [backup=/tmp/tmp.2oLRDN70cu/spack.yaml.bkp] $ spack -e . concretize -f
==> Starting concretization
==> Environment concretized in 1.17 seconds.
==> Concretized zlib
[+] hort4xo zlib@1.2.12%clang@11.0.0+optimize+pic+shared arch=linux-ubuntu20.04-zen2 $ cat spack.yaml
spack:
specs:
- zlib
view: true
concretizer:
unify: false |
@@ -28,3 +28,9 @@ concretizer: | |||
# instance concretize with target "icelake" while running on "haswell"). | |||
# If "true" only allow targets that are compatible with the host. | |||
host_compatible: true | |||
# When "true" concretize root specs of environments together, so that each unique | |||
# package in an environment corresponds to one concrete spec. This ensures |
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.
Future work, writing about it here since this comment made me think of it -- we should add a feature that this setting is applied to specs from the command line when multiple specs are provided (e.g. spack install foo bar baz
could co-concretize).
|
||
is_error = deprecated['error'] | ||
if not is_error: | ||
llnl.util.tty.warn(msg) | ||
warnings.warn(msg) |
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.
Why the switch to warnings.warn
here?
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.
warnings
gives a better way to filter things, even locally, and showing the warning is delegated to tty.warn
:
Lines 464 to 466 in 3833564
def send_warning_to_tty(message, *args): | |
"""Redirects messages to tty.warn.""" | |
tty.warn(message) |
|
||
is_error = deprecated['error'] | ||
if not is_error: | ||
llnl.util.tty.warn(msg) | ||
warnings.warn(msg) |
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.
warnings
gives a better way to filter things, even locally, and showing the warning is delegated to tty.warn
:
Lines 464 to 466 in 3833564
def send_warning_to_tty(message, *args): | |
"""Redirects messages to tty.warn.""" | |
tty.warn(message) |
Other candidate names for this option? We also refer to it as "consistent" concretization elsewhere. And the new type of concretization (not in this PR) is "maximally consistent"? |
* Introduce concretizer:unify option to replace spack:concretization * Deprecate concretization * Make spack:concretization overrule concretize:unify for now * Add environment update logic to move from spack:concretization to spack:concretizer:reuse * Migrate spack:concretization to spack:concretize:unify in all locations * For new environments make concretizer:unify explicit, so that defaults can be changed in 0.19
* Introduce concretizer:unify option to replace spack:concretization * Deprecate concretization * Make spack:concretization overrule concretize:unify for now * Add environment update logic to move from spack:concretization to spack:concretizer:reuse * Migrate spack:concretization to spack:concretize:unify in all locations * For new environments make concretizer:unify explicit, so that defaults can be changed in 0.19
Now that we have
concretizer
configuration, we can use it for environments.spack:concretizer:unify:true|false
in favor ofspack:concretization:together|separately
.spack env update
path. This update makes environments incompatible with Spack 0.17, but forward compatible with 0.19 once we removespack:concretization
.concretization
.spack:concretizer:unify
in newspack.yaml
files to make it easier for us to change the default ofunify: false
tounify: true
in 0.19. (Downside being that new environments in 0.18 are incompatible with 0.17 by default).default_manifest_yaml
into a function (should be private API?) so we can use spack.config in it.Further changes:
deprecatedProperties
by allowingreturn None
from the callback to signal it's not necessary to print yet another deprecation warning.spack.yaml
saying it's forward incompatible, ironically this error is backwards incompatible, so I've changed it into a warning.We don't really have to introduce yet another flag
spack env create --unify=...
becausespack -e . config add concretizer:unify:...
exists.