Upcoming high-impact changes #30634
Pinned
tgamblin
announced in
Announcements
Replies: 2 comments 1 reply
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion is meant to track upcoming changes to Spack that are likely to impact users. We'll put links to issues here that will either break existing workflows or cause major disruptions when you pull from
develop.developis the main development branch of Spack, but many users like to stay at the bleeding edge, and this is intended to provide advance warning for those users. Note that we still recommend using either a release (more here)or a fixed commit fromdevelopfor production/large site deployments.High-impact changes for
v1.2pip install spack,apt install spack, and evenmodule load spack.$spack/optor$spack/share/spack/modules) Spack will notice and keep using it.~for all of them. More details on that belowspack isolatecommand in1.2that will allow you to quickly configure a new Spack installation to only write to its own prefix (all config, installs, modules, everything).spec.jsonand package hash #32312: Part of Spack SBOM support. Updates thespecJSON and will change all new hashes, but doesn't strictly require a version bump.spack install -pto control package parallelism. To switch back to the old installer, usespack config add config:installer:old.Force Spack to use its old install location when mixing old/new Spack instances
If you don't clone a new instance of Spack, and only
git pullinto old instances, then each of those will continue to write into their own prefixes.If new instances are cloned but are configured to write outside of the default in
~, then old spack instances will continue to write into their own prefixes.If any new spack instance is cloned and writes into
~(the new default in 1.2), then any old spack instance that updates to version 1.2 will start writing into~as well.config:install_tree:rootto point to that location ($spack/opt/spack).config:install_tree:rootbefore pulling 1.2.Other data stored in
$spackalso moves out in 1.2:Environments, and you can restore old behavior with
config:environments_root:$spack/var/spack/environments.Modules, and you can restore old behavior by setting
modules:default:roots:{tcl,lmod}to$spack/share/spack/{modules,lmod}GPG keys
spack gpg initare stored in$spack/var/spack/gpg.If mixing old and new instances of spack
spack gpg init --from=<spack-prefix>/var/spack/gpgif you placed any keys there (in other words, that directory is managed like any external store of GPG keys).SPACK_GNUPGHOMEenvironment variable to<spack-prefix>/opt/spack/gpg.Past changes
High-impact changes for v1.1
Several changes to better handling compiler mixing during concretization:
%%#51383Configuration scopes: fix severe ordering issue when
-Cand-eare used together #51461 - this fixes a bug with config ordering that we thought we fixed in 1.0. Environments are now always lower priority than-Cscopes and-cconfig specified on the CLI.config: define config scopes in configuration #51162: The
$spack/etc/spackconfiguration scope inside the spack installation will be the highest priority scope, and you will be able to completely remove other configuration scopes (like~/.spack) if you want to. To accommodate this,$spack/etc/spackwill be higher priority than the user config scope (~/.spack) from 1.1 onwards. If you have configuration there that you want to be lower priority than the user scope, you can move it into$spack/etc/spack/site.externals: Model as concrete specs and add dependency definitions #51118: Externals are treated differently by the concretizer, are more deterministic, and we now support defining dependencies among externals. This change is needed to properly match compilers between built packages and externals. Some behaviors, like auto-wiring external python extensions to a guessed python external, are deprecated and will need to be specified explicitly in
packages.yamlin the future.Enable concretization caching (redux) #50905: Concretization results are now cached by their inputs, so that we do not have to run
clingofor every concretization call. This feature should be very robust, but we note it here in case you see issues. You should see typical concretizations take about half the time if they have been run before. Longer running concretizations should see even more benefit. This should be completely transparent, as we cache all inputs to the solve. If you see issues with concretization caching you can disable it in config withspack config set 'concretizer:concretization_cache:enable:false', or you can runspack clean -mto clear the cache.High-impact changes for v1.0
Turn compilers into nodes #45189: In v1.0 compilers will be modeled as nodes. This PR tracks all the modifications that are necessary to change the DAG model in this sense.
Parse
%as^in specs #49808: The meaning of the percent symbol%in spec strings will change, leading to a breaking change. In Spack v0.x it was a compiler property of a node, in Spack v1.0 it means "direct dependency" instead, and is similar to the caret^which means direct or transitive dependency. In Spack v0.x,pkg %gcc +fooparses the same aspkg +foo %gcc-- the+foovariant applies topkgin either case. The breaking change in Spack v1.0 is that the variant+fooinpkg %gcc +foonow applies togccinstead, sincegccis a normal package. This ensures we have the following symmetry:In Spack v1.0.0.dev0 you will get warnings if you put
+variant,@version,arch=,platform=,os=,target=, and/hashafter the%compilerin a spec string.Eventually, (either in
developor in 1.0) this warning will turn into an error at concretization time, if+vis not a variant ofpkgin specs like%pkg +v.On
develop, you can use thespack style --spec-stringscommand to updatepackage.pyfiles,spack.yamlfiles, etc. You can run, e.g.:After this PR
spack compiler findwill write by default inpackages.yaml. Thecompilers.yamlconfiguration file is still read by Spack, if present, but is now deprecated. Future versions of Spack (possibly v1.2) will remove it.spack.spec.SpecBuildInterface: spack.repo dep #48984: removes support for
spec["mpi"]if spec itself is openmpi / mpich that could provide mpi; from the Spec instance we don't have any parent it provides it to, hence it's aKeyErrorSpec.__getitem__: restrict to direct deps + transitive runtime deps #49016: with this change
spec["pkg"]searches only direct dependencies and transitive link/run dependencies, ordered by depth. This avoids situations where we pick up unwanted deps of build/test deps. To reach those, you need to dospec["build_dep"]["pkg"]explicitly.Toolchains: parse-time aliases for dependencies #50481: Spack now has a concept of a "toolchain". The toolchain is just an alias for common dependencies, flags, and other spec properties that you can attach to a node in a graph with
%. This allows you to do with compiler dependencies what we used to do withcompilers.yaml, and more. Toolchains are versatile and composable as they are simply aliases for regular specs. You can use them to represent mixed compiler combinations, compiler/MPI/numerical library groups, particular runtime libraries, and flags -- all to be applied together.configuration: remove platform-specific scopes #50603: Platform config scopes are now opt-in. If you want to use subdirectories like
darwinorlinuxin your scopes, you'll need to include them explicitly in aninclude.yamlor in yourspack.yamlfile, like so:binary_distribution: content addressable tarballs #48713: This changes the format of build caches to address a number of scaling and consistency issues with our current (aging) buildcache layout. The new build cache format is not backward compatible with the old format, but you can have a new build cache and an old build cache coexist together. After this is merged, binary mirrors that are not migrated will become unusable, as this change restructures how both spec files and compressed tarballs are stored within non-oci mirrors.
spack buildcache migrateto migrate old build caches in place to the new format.We will be splitting the
builtinpackage repository out into its own git repository for v1.0. You can comment on the discussion here: Discussion: Move built-in packages to a separate repository #47480var/spack/repos/spack_repo/builtininstead ofvar/spack/repos/builtinv2.0. If you have custom package repositories that depend on builtin, you can upgrade those to package apiv2.0as well using thespack repo migratecommand. It will deal with he following changes:spack.pkg.builtinin Python, you now need to import fromspack_repo.builtininstead:Directory names where normalized so they are valid Python modules
py-numpy/package.py->py_numpy/package.py(hyphen is replaced by underscore)7zip/package.py->_7zip/package.py(leading digits are now preceded by an underscore)pass/package.py->_pass/package.py(reserved keywords are preceded by an underscore)Move builders into builtin repo #50452: The module
spack.packageno longer exports the following symbols:AspellDictPackage,AutotoolsPackage,BundlePackage,CachedCMakePackage,cmake_cache_filepath,cmake_cache_option,cmake_cache_path,cmake_cache_string,CargoPackage,CMakePackage,generator,CompilerPackage,CudaPackage,Package,GNUMirrorPackage,GoPackage,IntelPackage,IntelOneApiLibraryPackageWithSdk,IntelOneApiLibraryPackage,IntelOneApiStaticLibraryList,IntelOneApiPackage,INTEL_MATH_LIBRARIES,LuaPackage,MakefilePackage,MavenPackage,MesonPackage,MSBuildPackage,NMakePackage,OctavePackage,PerlPackage,PythonExtension,PythonPackage,QMakePackage,RacketPackage,RPackage,ROCmPackage,RubyPackage,SConsPackage,SIPPackage,SourceforgePackage,SourcewarePackage,WafPackage,XorgPackage. For backward compatibility with old, custom repositories these symbols are implicitly defined inpackage.pyand no action is required if your package has the typicalfrom spack.package import *line. From package apiv2.0you need to explicitly import package classes, just like builders. Eventually this will look likefrom spack_repo.builtin.build_systems.cmake import CMakePackage, etc.These names will still work for old-style (
v1.0) package repositories and not inv2.0package API repos. v1.0 package repositories are deprecated in Spack v1.0, and will be removed in a future version, but this support will remain in place for at least a year so that you can continue to use old-style repos with Spack v1.0 and earlier versions simultaneously. Note: this means that the API stability promise in Spack v1.0 does not include old-style package repositories, so you should update as soon as you can.Don't inject import statements in package recipes #47947:
from spack.package import *(or more specific imports) will be necessary in packages. This also allows IDEs, code editors, and other tools to understand Spack packages better. The magic we have done since the early days of Spack was getting in the way for little benefit, and this change was also necessary to support Python 3.13.Pin git sha to git ref based versions #44319: Before, Spack's Git reference based package versions (specifically tags and branches) were ambiguous i.e. two
spec@developinstallations from different commits could be treated as equivalent by the solver. This PR will cause spack to resolve branch and tags to specific commits using thespec@git.[commit sha]=developsyntax.concretization: move spec concretization logic to spack.concretize #47971, spec.py: move lookup_hash and replace_hash to separate module #47978: Remove long-standing internal API methods
Spec.concretize()andSpec.concretized(). They are immediately deprecated ondevelopand will be removed in the release. Usespack.concretize.concretize_one(spec)instead.binary_distribution: stop relocating tarballs with relative rpaths #48488, binary_distribution.py: stop relocation old /bin/bash sbang shebang #48502: buildcache entries created with Spack 0.19 and older using
spack buildcache create --relwill no longer be relocated upon install. These old binaries should continue to work, except when they are installed with differentconfig:install_tree:projectionscompared to what they were built with. Similarly, buildcache entries created with Spack 0.15 and older that contain long shebang lines wrapped with sbang will no longer be relocated.remove std_cmake_args, std_pip_args, std_meson_args #50462: the package.py globals
std_cmake_args,std_pip_args,std_meson_argswere removed. They were deprecated in Spack 0.23. UseCMakeBuilder.std_args(pkg),PythonPipBuilder.std_args(pkg)andMesonBuilder.std_args(pkg)instead.Move external python glue logic into core #50605, Move python glue logic again #50616: If you were using
update_external_dependencies()in your private packages, note that it is going away in 1.0 to get it out of the package API. It is instead being moved into the concretizer, where it can change in the future, when we have a better way to deal with dependencies of externals, without breaking the package API. We suspect that nobody was doing this, but it's technically a breaking change.concretizer: make
--forceconfig and a common argument #48838: Two breaking command changes:spack installno longer has a-f/--fileoption -- writespack install ./path/to/spec.jsoninstead.spack mirror createno longer has a short-foption -- usespack mirror create --fileinstead.Developer Certificate of Origin (DCO): Spack is a Linux Foundation project and as part of this we started requiring DCO signoff on Spack commits in core. Packages do not (yet) require DCO. DCO was created for the Linux Kernel, and it's used by nearly all Linux Foundation projects. Basically what that means is that your commits need a signoff trailer like this at the end:
This is an attestation by you (not your company -- just you) that you have the right to contribute the code you're committing. The full text of the certificate is at developercertificate.org.
In practice, it is fairly simple to comply with this. GitHub has support for automatically signing off commits made in the GitHub web UI, and git commits made on the command line just need an extra
git commit --signofforgit commit -sargument. We will also be addingspackbotsupport in the future, so that you can@spackbot signoffif you forget. Once we do this we'll consider DCO for packages.High-impact changes for v0.23
Add
depends_on([c,cxx,fortran])#45217: Your packages can explicitly depend on the languages they require. Historically, Spack has considered C, C++, and Fortran compiler dependencies to be implicit. You will need to ensure that new packages add relevant languages as dependencies like this:You do not have to add this to packages that don't need these languages, e.g., pure python packages.
We have already auto-generated these dependencies for existing packages in #45217, based on the types of source files present in packages' source archives. We may have added too many or too few language dependencies, so please correct your packages as needed by submitting a pull request.
Deprecate Cray platform, based on PE modules #43796: support for
platform=crayis discontinued, and any mention ofplatform=crayhas been removed from core and packages.concretize.lp: drop 0 weight of external providers #45025: Before, Spack was considering an external provider for a virtual as good as the preferred provider. After the change, the provider will keep its normal ranking. This means that if e.g.
openmpiis the preferredmpi, and there's an entry formpichin externals, then a newopenmpiwill be built - if building it is possible. To play well with externals,spack external find --not-buildablewill mark virtuals as not buildable too, when a provider is detected.Remove the old concretizer #45215: The old concretizer has been removed from Spack, together with the associated config option. A warning is emitted if the option is present in user configuration, since it has now no effect. When
clingoneeds to be bootstrapped from sources, a JSON prototype is tweaked to get a correct concrete spec.Avoid best-effort expansion of stacks #40792: best-effort expansion of spec matrices has been removed. It was already not working for the new concretizer, and buggy with the old one. After Remove the old concretizer #45215 it didn't make sense to keep it.
Deprecate
config:install_missing_compilers#46237: Theconfig:install_missing_compilersconfig option has been deprecated, and is a no-op when set in v0.23Remove deprecated config options #44061: The config options that have been deprecated in v0.21 are now removed in v0.23
High-impact changes for v0.22
Compilers as dependencies: We are in the process of making compilers proper dependencies in Spack, and a number of changes in
v0.22will support that effort:%gccon Linux, macOS and FreeBSD now depend on a new packagegcc-runtime, which contains a copy of the shared compiler runtime libraries. This fixes various issues: gcc runtime libraries can be installed and relocated when using a build cache, and when building minimal Spack-generated container images it is no longer necessary to install libgfortran, libgomp etc using the system package manager.intel-oneapi-runtime, allow injecting virtual dependencies #42062: Packages compiled with%oneapinow depend on a new packageintel-oneapi-runtime. The change is similar to gcc-runtime: add separate package for gcc runtime libs #41104, except now the runtimes can provide virtuals and compilers can inject dependencies on virtuals into compiled packages. This allows to model libraries soname compatibility and allows compilers like%oneapito provide virtuals likesycl(that can also be provided by standalone libraries).%gccand%oneapispecs that don't have the corresponding runtime as a dependency.linuxis now based onlibc, instead of on theostag. For each linux machine, allowedlibcs are detected from the available compilers and used as an implicit external spec. Binaries with a libc having the same name and a version lesser or equal than a detected libc are considered compatible with it. Nothing changes for macOS or Windows.spack external find. External packages defining compiler paths are effectively used as compilers, andspack external find -t compilercan be used as a substitute forspack compiler find.Improve parsing of quoted flags and variants in specs #41529: We are making some breaking changes to how Spack parses specs on the CLI in order to respect shell quoting instead of trying to fight it. If you had to write something like this on the command line (ugh):
That will now result in an error, but you can now write what you probably expected to work in the first place:
Quoted can also now include special characters, so you can supply flags like:
To reduce ambiguity in parsing, we now require that you not put spaces around
=and==when for flags or variants.So, this will now result in an error where it wouldn't have before:
python: always use a venv #40773: Spack has unique requirements for Python because it a) installs every package in its own independent directory and b) allows users to register external python installations that may contain their own installed packages. Some distributions like Ubuntu and Debian even change the system Python's
sysconfigin ways that change the installation layout of Python packages when they are installed (e.g. with the addition of a/localprefix on Debian or Ubuntu). To isolate Spack from these and other issues, we now insert a smallpython-venvpackage in betweenpythonand packages that need to install Python code. This resolves a large number of issues we've had with Python installations.concretizer: update
reuse:default to True #41302: We made a mistake when we set the default reuse policy to--reuse-depsinstead of--reuse- we're changing it back for reasons outlined in this PR. You will need to use--reuse-depsif you want the old behavior.Only reuse externals when configured #41707: This ensures that external entries that make it into the database are only reused if they represent an external still configured in
packages.yaml. This will ensure that changes to the configured externals are reflected immediately, rather than requiring additional steps to ensure the artifacts are no longer in the database.binary_distribution.py: list parent dirs in binary tarball #41773: Build cache entries created with Spack 0.22 are (forward) incompatible with Spack 0.21.0 (they cause errors on install), but are compatible with Spack 0.21.1. This is due to a backwards compatible change to the structure of the tarballs.
spack load: remove --only argument #42120: removed the
--onlyargument, which was deprecated in v0.21High-impact changes for v0.21
zlib-api: usezlib-ng +compatby default #39358: Possibly high impact, probably not: switching fromzlibto the much fasterzlib-ng+compatas our defaultzlib-apiprovider. If you notice issues, please comment on the PR.env:as a top level environment attribute #38199: Usingenv:as a top-level attribute in environments was deprecated in v0.20, and is removed in this PR.specJSON format (and DB format) will be bumped, and older spack versions won't be able to read it if you've installed things with this change. Similarly, older Spack versions will not be able to use newer build caches (this has never been a guaranteed, but older versions could at least read newer caches).cythonorsetuptoolsin a DAG)targets,compilersandprovidersare only global, preferences forversionsare only local to packages.developbranch will be tagged as:develop, while:latestis reserved for thelatestrelease.High-impact changes for v0.20
developno longer runs on Python 2.7! It's been a long journey to get to this point, but we finally said goodbye.spack buildcache createis migrating to use more flexible positional arguments, and use of--directory.--mirror-url, and--mirror-nameis deprecated.spack installless "surprising", when an environment is active. This is not backward compatible for commands likespack install x y zorspack install --add x y z(though the previous behavior is hard to justify with some rationale).build_typevariant inCMakePackagefromRelWithDebInfotoRelease. This will provide both performance and space savings. The PR and linked issue include longer discussions of the trade-offs involved.@X.Yalways represents a range@X.Y:X.Y, no matter the context in which it appears. The new syntax@=X.Yhas been introduced to specify a single version. This change solves issues we had for a long time with selecting a specific version, but is backward incompatible in a few pathological cases.--force#37438: Spack will not change the previously concretized specs, when new specs are added to an environment already in use and Spack is asked to concretize it. To reconcretize as if there was no previous lockfile, users have to pass the--forceflag explicitly tospack concretize.High-impact changes for v0.19
concretizationenvironment key #33774: theconcretizationkey in Spack environment, already deprecated in v0.18, will be removed in v0.19spack bootstrap trust/untrustcommands are deprecated as of v0.19, in favor ofspack bootstrap enable/disablespack installin an environment will no longer add to thespecs:list; you'll need to either usespack add <spec>orspack install --add <spec>. Similarly,spack uninstallwill not remove specs from your environment'sspecs:list; you will need to usespack removeorspack uninstall --remove. This is to minimize the number of commands that modifyspack.yaml, and to make it easier to install/uninstall specific specs from environments stored in repositories.LD_LIBRARY_PATHon package load #28354:spack loadand spack-generated modules will no longer setLD_LIBRARY_PATHby default. You can get the old behavior in your environment or modules by running:v.0.19will be deprecating Python 2 support, and Python 2 support will be removed from Spackdevelopshortly afterv0.19is released.cflags==-O3instead ofcflags=-O3)blacklist/whitelistin favor ofinclude/exclude#31569: We're changing module configuration syntax slightly. You can usespack config updateto automatically fix your configuration files.package.py. Backward compatibility with the previous style is kept as much as possible.High-impact changes for v0.18
--reusethe default concretizer behavior. This will be configurable so you can revert back using Add a top-levelconcretizerconfig scope and--freshoption #28468.--reuseis default, we will be switching to a "full hash" as the default package id in Spack. Spack has long used a coarser package hash that it probably should, in order to prevent redundant rebuilds. Specifically, we omit build dependencies, the hash ofpackage.py, and the hashes of resources (tarballs, etc.) from our build identifiers. This was mainly to prevent every update ofcmakeor other build tools from triggering a rebuild of the full stack. With--reuseas the default, we don't have this concern any more, and we will prioritize detailed provenance for package builds. The full hash will provide this and will also avoid hash collisions that we currently see in CI.pip installinstead ofpython setup.py install. It also improves bootstrapping of frontend tools (pip/build/installer) and backend tools (setuptools/flit/poetry).Deprecate Python 2 installations #28003: This PR deprecates versions of Python that have reached EOL (Python 2.7-3.5) and packages that require them. Note that this PR does not affect which versions of Python can be used to run Spack, it only affects which versions of Python Spack can install.High-impact changes for v0.17
spec.yamlformat that Spack uses for hashes tospec.json. We're doing this for performance -- YAML is too slow for large operations, like reindexing the Spack database or creating indexes for large build caches. We expect this to speed up Spack in many ways, but it will cause the hashing algorithm to change.clingothe default solver, in preparation for 0.17.0. You may see different concretizations for some packages, and the new concretizer will need to be bootstrapped (see https://spack.io/changes-spack-v017/). You can switch back by settingconcretizer: originalinconfig.yaml, but note that the original concretizer will be deprecated in 0.17 and removed in a later version.develop-- it will not be supported in v0.18.Beta Was this translation helpful? Give feedback.
All reactions