|
| 1 | +# v0.20.0 (2023-05-21) |
| 2 | + |
| 3 | +`v0.20.0` is a major feature release. |
| 4 | + |
| 5 | +## Features in this release |
| 6 | + |
| 7 | +1. **`requires()` directive and enhanced package requirements** |
| 8 | + |
| 9 | + We've added some more enhancements to requirements in Spack (#36286). |
| 10 | + |
| 11 | + There is a new `requires()` directive for packages. `requires()` is the opposite of |
| 12 | + `conflicts()`. You can use it to impose constraints on this package when certain |
| 13 | + conditions are met: |
| 14 | + |
| 15 | + ```python |
| 16 | + requires( |
| 17 | + "%apple-clang", |
| 18 | + when="platform=darwin", |
| 19 | + msg="This package builds only with clang on macOS" |
| 20 | + ) |
| 21 | + ``` |
| 22 | + |
| 23 | + More on this in [the docs]( |
| 24 | + https://spack.rtfd.io/en/latest/packaging_guide.html#conflicts-and-requirements). |
| 25 | + |
| 26 | + You can also now add a `when:` clause to `requires:` in your `packages.yaml` |
| 27 | + configuration or in an environment: |
| 28 | + |
| 29 | + ```yaml |
| 30 | + packages: |
| 31 | + openmpi: |
| 32 | + require: |
| 33 | + - any_of: ["%gcc"] |
| 34 | + when: "@:4.1.4" |
| 35 | + message: "Only OpenMPI 4.1.5 and up can build with fancy compilers" |
| 36 | + ``` |
| 37 | +
|
| 38 | + More details can be found [here]( |
| 39 | + https://spack.readthedocs.io/en/latest/build_settings.html#package-requirements) |
| 40 | +
|
| 41 | +2. **Exact versions** |
| 42 | +
|
| 43 | + Spack did not previously have a way to distinguish a version if it was a prefix of |
| 44 | + some other version. For example, `@3.2` would match `3.2`, `3.2.1`, `3.2.2`, etc. You |
| 45 | + can now match *exactly* `3.2` with `@=3.2`. This is useful, for example, if you need |
| 46 | + to patch *only* the `3.2` version of a package. The new syntax is described in [the docs]( |
| 47 | + https://spack.readthedocs.io/en/latest/basic_usage.html#version-specifier). |
| 48 | + |
| 49 | + Generally, when writing packages, you should prefer to use ranges like `@3.2` over |
| 50 | + the specific versions, as this allows the concretizer more leeway when selecting |
| 51 | + versions of dependencies. More details and recommendations are in the [packaging guide]( |
| 52 | + https://spack.readthedocs.io/en/latest/packaging_guide.html#ranges-versus-specific-versions). |
| 53 | + |
| 54 | + See #36273 for full details on the version refactor. |
| 55 | + |
| 56 | +3. **New testing interface** |
| 57 | + |
| 58 | + Writing package tests is now much simpler with a new [test interface]( |
| 59 | + https://spack.readthedocs.io/en/latest/packaging_guide.html#stand-alone-tests). |
| 60 | + |
| 61 | + Writing a test is now as easy as adding a method that starts with `test_`: |
| 62 | + |
| 63 | + ```python |
| 64 | + class MyPackage(Package): |
| 65 | + ... |
| 66 | +
|
| 67 | + def test_always_fails(self): |
| 68 | + """use assert to always fail""" |
| 69 | + assert False |
| 70 | +
|
| 71 | + def test_example(self): |
| 72 | + """run installed example""" |
| 73 | + example = which(self.prefix.bin.example) |
| 74 | + example() |
| 75 | + ``` |
| 76 | + |
| 77 | + You can use Python's native `assert` statement to implement your checks -- no more |
| 78 | + need to fiddle with `run_test` or other test framework methods. Spack will |
| 79 | + introspect the class and run `test_*` methods when you run `spack test`, |
| 80 | + |
| 81 | +4. **More stable concretization** |
| 82 | + |
| 83 | + * Now, `spack concretize` will *only* concretize the new portions of the environment |
| 84 | + and will not change existing parts of an environment unless you specify `--force`. |
| 85 | + This has always been true for `unify:false`, but not for `unify:true` and |
| 86 | + `unify:when_possible` environments. Now it is true for all of them (#37438, #37681). |
| 87 | + |
| 88 | + * The concretizer has a new `--reuse-deps` argument that *only* reuses dependencies. |
| 89 | + That is, it will always treat the *roots* of your environment as it would with |
| 90 | + `--fresh`. This allows you to upgrade just the roots of your environment while |
| 91 | + keeping everything else stable (#30990). |
| 92 | + |
| 93 | +5. **Weekly develop snapshot releases** |
| 94 | + |
| 95 | + Since last year, we have maintained a buildcache of `develop` at |
| 96 | + https://binaries.spack.io/develop, but the cache can grow to contain so many builds |
| 97 | + as to be unwieldy. When we get a stable `develop` build, we snapshot the release and |
| 98 | + add a corresponding tag the Spack repository. So, you can use a stack from a specific |
| 99 | + day. There are now tags in the spack repository like: |
| 100 | + |
| 101 | + * `develop-2023-05-14` |
| 102 | + * `develop-2023-05-18` |
| 103 | + |
| 104 | + that correspond to build caches like: |
| 105 | + |
| 106 | + * https://binaries.spack.io/develop-2023-05-14/e4s |
| 107 | + * https://binaries.spack.io/develop-2023-05-18/e4s |
| 108 | + |
| 109 | + We plan to store these snapshot releases weekly. |
| 110 | + |
| 111 | +6. **Specs in buildcaches can be referenced by hash.** |
| 112 | + |
| 113 | + * Previously, you could run `spack buildcache list` and see the hashes in |
| 114 | + buildcaches, but referring to them by hash would fail. |
| 115 | + * You can now run commands like `spack spec` and `spack install` and refer to |
| 116 | + buildcache hashes directly, e.g. `spack install /abc123` (#35042) |
| 117 | + |
| 118 | +7. **New package and buildcache index websites** |
| 119 | + |
| 120 | + Our public websites for searching packages have been completely revamped and updated. |
| 121 | + You can check them out here: |
| 122 | + |
| 123 | + * *Package Index*: https://packages.spack.io |
| 124 | + * *Buildcache Index*: https://cache.spack.io |
| 125 | + |
| 126 | + Both are searchable and more interactive than before. Currently major releases are |
| 127 | + shown; UI for browsing `develop` snapshots is coming soon. |
| 128 | + |
| 129 | +8. **Default CMake and Meson build types are now Release** |
| 130 | + |
| 131 | + Spack has historically defaulted to building with optimization and debugging, but |
| 132 | + packages like `llvm` can be enormous with debug turned on. Our default build type for |
| 133 | + all Spack packages is now `Release` (#36679, #37436). This has a number of benefits: |
| 134 | + |
| 135 | + * much smaller binaries; |
| 136 | + * higher default optimization level; and |
| 137 | + * defining `NDEBUG` disables assertions, which may lead to further speedups. |
| 138 | + |
| 139 | + You can still get the old behavior back through requirements and package preferences. |
| 140 | + |
| 141 | +## Other new commands and directives |
| 142 | + |
| 143 | +* `spack checksum` can automatically add new versions to package (#24532) |
| 144 | +* new command: `spack pkg grep` to easily search package files (#34388) |
| 145 | +* New `maintainers` directive (#35083) |
| 146 | +* Add `spack buildcache push` (alias to `buildcache create`) (#34861) |
| 147 | +* Allow using `-j` to control the parallelism of concretization (#37608) |
| 148 | +* Add `--exclude` option to 'spack external find' (#35013) |
| 149 | + |
| 150 | +## Other new features of note |
| 151 | + |
| 152 | +* editing: add higher-precedence `SPACK_EDITOR` environment variable |
| 153 | +* Many YAML formatting improvements from updating `ruamel.yaml` to the latest version |
| 154 | + supporting Python 3.6. (#31091, #24885, #37008). |
| 155 | +* Requirements and preferences should not define (non-git) versions (#37687, #37747) |
| 156 | +* Environments now store spack version/commit in `spack.lock` (#32801) |
| 157 | +* User can specify the name of the `packages` subdirectory in repositories (#36643) |
| 158 | +* Add container images supporting RHEL alternatives (#36713) |
| 159 | +* make version(...) kwargs explicit (#36998) |
| 160 | + |
| 161 | +## Notable refactors |
| 162 | + |
| 163 | +* buildcache create: reproducible tarballs (#35623) |
| 164 | +* Bootstrap most of Spack dependencies using environments (#34029) |
| 165 | +* Split `satisfies(..., strict=True/False)` into two functions (#35681) |
| 166 | +* spack install: simplify behavior when inside environments (#35206) |
| 167 | + |
| 168 | +## Binary cache and stack updates |
| 169 | + |
| 170 | +* Major simplification of CI boilerplate in stacks (#34272, #36045) |
| 171 | +* Many improvements to our CI pipeline's reliability |
| 172 | + |
| 173 | +## Removals, Deprecations, and disablements |
| 174 | +* Module file generation is disabled by default; you'll need to enable it to use it (#37258) |
| 175 | +* Support for Python 2 was deprecated in `v0.19.0` and has been removed. `v0.20.0` only |
| 176 | + supports Python 3.6 and higher. |
| 177 | +* Deprecated target names are no longer recognized by Spack. Use generic names instead: |
| 178 | + * `graviton` is now `cortex_a72` |
| 179 | + * `graviton2` is now `neoverse_n1` |
| 180 | + * `graviton3` is now `neoverse_v1` |
| 181 | +* `blacklist` and `whitelist` in module configuration were deprecated in `v0.19.0` and are |
| 182 | + removed in this release. Use `exclude` and `include` instead. |
| 183 | +* The `ignore=` parameter of the `extends()` directive has been removed. It was not used by |
| 184 | + any builtin packages and is no longer needed to avoid conflicts in environment views (#35588). |
| 185 | +* Support for the old YAML buildcache format has been removed. It was deprecated in `v0.19.0` (#34347). |
| 186 | +* `spack find --bootstrap` has been removed. It was deprecated in `v0.19.0`. Use `spack |
| 187 | + --bootstrap find` instead (#33964). |
| 188 | +* `spack bootstrap trust` and `spack bootstrap untrust` are now removed, having been |
| 189 | + deprecated in `v0.19.0`. Use `spack bootstrap enable` and `spack bootstrap disable`. |
| 190 | +* The `--mirror-name`, `--mirror-url`, and `--directory` options to buildcache and |
| 191 | + mirror commands were deprecated in `v0.19.0` and have now been removed. They have been |
| 192 | + replaced by positional arguments (#37457). |
| 193 | +* Deprecate `env:` as top level environment key (#37424) |
| 194 | +* deprecate buildcache create --rel, buildcache install --allow-root (#37285) |
| 195 | +* Support for very old perl-like spec format strings (e.g., `$_$@$%@+$+$=`) has been |
| 196 | + removed (#37425). This was deprecated in in `v0.15` (#10556). |
| 197 | + |
| 198 | +## Notable Bugfixes |
| 199 | + |
| 200 | +* bugfix: don't fetch package metadata for unknown concrete specs (#36990) |
| 201 | +* Improve package source code context display on error (#37655) |
| 202 | +* Relax environment manifest filename requirements and lockfile identification criteria (#37413) |
| 203 | +* `installer.py`: drop build edges of installed packages by default (#36707) |
| 204 | +* Bugfix: package requirements with git commits (#35057, #36347) |
| 205 | +* Package requirements: allow single specs in requirement lists (#36258) |
| 206 | +* conditional variant values: allow boolean (#33939) |
| 207 | +* spack uninstall: follow run/link edges on --dependents (#34058) |
| 208 | + |
| 209 | +## Spack community stats |
| 210 | + |
| 211 | +* 7,179 total packages, 499 new since `v0.19.0` |
| 212 | + * 329 new Python packages |
| 213 | + * 31 new R packages |
| 214 | +* 336 people contributed to this release |
| 215 | + * 317 committers to packages |
| 216 | + * 62 committers to core |
| 217 | + |
| 218 | + |
1 | 219 | # v0.19.1 (2023-02-07) |
2 | 220 |
|
3 | 221 | ### Spack Bugfixes |
|
0 commit comments