Skip to content

Update spack-stack-dev from spack develop 2026/01/09#574

Merged
climbfuji merged 464 commits intoJCSDA:spack-stack-devfrom
climbfuji:feature/update_spack-stack-dev_from_develop
Jan 21, 2026
Merged

Update spack-stack-dev from spack develop 2026/01/09#574
climbfuji merged 464 commits intoJCSDA:spack-stack-devfrom
climbfuji:feature/update_spack-stack-dev_from_develop

Conversation

@climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Jan 9, 2026

Description

Note. This PR must be merged as a regular merge, not as a squashed merge!

This PR updates spack-stack-dev from the upstream Spack develop branch. Because spack-stack-dev was previously based on Spack release v1.0.1 with a few modifications cherry-picked from develop, and because the Spack developers no longer maintain mergeability between the releases and the develop branch, I had to resolve several merge conflicts.

One of the perks of this update is that we can reenable most GitHub actions tests, which resolves #573.

Because we previously cherry-picked some commits from develop into the spack-stack-dev branch, we now have fewer differences:

spack v1.0.1 vs spack-stack-dev before this PR: https://github.com/spack/spack/compare/v1.0.1...JCSDA:spack:spack-stack-dev?expand=1

spack develop as of 2026/01/09 vs this PR: https://github.com/spack/spack/compare/develop...climbfuji:feature/update_spack-stack-dev_from_develop?expand=1

Testing

alalazo and others added 30 commits October 13, 2025 13:25
Due to performance and modeling reasons, the specs that are
reused in concretization are represented in the ASP problem
with their pure build dependencies trimmed.

On `develop` this means that any preference of the form:
```yaml
packages:
  c:
    prefer:
    - llvm
```
is "disregarded" for purely reused specs, since the solver
is not aware of the compiler nodes used for them.

This commit fixes the semantics of virtual preferences so
that they are respected also for reused specs. It does so
without representing their compilers as nodes - so the modeling
of the DAG is not steered towards different optimal solutions
by the missing compilers.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
* Handle URL paths

Signed-off-by: Ryan Krattiger <ryan.krattiger@kitware.com>
The current condition under which Spack starts a POSIX jobserver is
whether all `gmake`s and `ninja`s in the DAG support
`--jobserver-auth=FIFO:PATH`.

That's does not take into account the (currently) unmodelled implicit
dependency of `gcc` on `gmake`. GCC's `lto-wrapper` executable generates
a temporary Makefile and invokes make  either from the `MAKE`
environment variable, or by looking in `PATH`.

I don't think this is very trivial to fix, other than making GCC inject
`gmake` as a build dependency, but that leads to circular dependencies
since `gmake` is used to build GCC.

Easier to revert for now and move this feature to the experimental
installer PR where we can probably get away with it for now without a
fix.

This reverts commit 9c1ed1a.

Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
…ases (spack#50477)

* Append to install-time test log for multiple test phases

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* log.py: fix tmp dir arg

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* log.py: fix typo (:)

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* use existing tests/pkg

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* remove new test file/pkg

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* test/cmd/install.py: skip log append check for win32

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* test/cmd/install.py: skip install 'tests' for win32

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* test/cmd/install.py: fix install test-skip logic (win32)

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* test/cmd/install.py: skip test_package_output for windows

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

* Revert "test/cmd/install.py: skip test_package_output for windows"

This reverts commit f14beed.

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>

---------

Signed-off-by: Alex Richert <alexander.richert@noaa.gov>
Third try to enable concretization caching in `develop`. Past attempts were reverted due to cache
management issues and race conditions.

See spack#48198 for the introduction of the concretization cache, manifest, etc. That PR only
added testing for the cache itself, not the manifest or cleanup procedures.

This PR:

- [x] Adds tests for cleanup
- [x] Refactors the cache to store base32 hashes like the rest of Spack's hashes
- [x] gzips cache entries for a smaller memory footprint
- [x] Removes redundant stat calls 
- [x] Less aggressive/error prone cleanup phase
- [x] Adds an entry limit to the cache, removes the size limit
- [x] Rewrite pruning to use LRU instead of FIFO
- [x] Canonicalizes and strips `clingo` input before hashing, for greater hit rate

This PR simplifies the locking around the concretization cache. Entries are stored by
the base32 hash of their inputs, and there is a single lock file (as we do in many places in
spack) for all such entries. We use byte range locks to manage all the entries.

Cleanup has changed to be less expensive overall. There is no more size limit; there is only
an entry limit, and specs in the cache are compressed. Specs are ~35k, and the initial limit
is 1000 cache entries, or ~35 MB.  This limit is customizable in configuration. To check if the
cache needs cleanup, we need only list files in the cache directory. To clean up, we stat the files
and clean up the least recently used concretizations.  We remove half the cache at a time so that
we do not pay for cleanup on every concretization when we're close to the cache limit.

The concretization cache is stored in the `misc_cache` by default, so `spack clean -m` is all
that is needed to get rid of it.  The location of the concretization cache can be specified
independently (with a `url` config option) but we will document and expand on that use later
as we integrate it in CI.

---------

Signed-off-by: John Parent <john.parent@kitware.com>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
…ack#51118)

This commit fundamentally changes how externals are handled in the solver
and introduces new methods for defining dependencies between them,
addressing the design described in issue spack#49697.

Core Solver Change:
-------------------

Previously, externals were treated as a form of "configuration" and
handled as a pervasive special case throughout the solver rules.

With this change, externals are now modeled as fully concrete, installed
specs *before* the solve begins. This allows the solver to treat them
just like any other installed package, reusing them as available.
This greatly simplifies the solver logic and removes numerous special
cases.

This new model enables more robust dependency specification, which is
provided in two new formats:

Inline Spec Syntax:
-------------------

Users can now specify dependencies directly in the main `spec:` string,
leveraging the familiar Spack syntax.

  packages:
    mpileaks:
      externals:
      - spec: "mpileaks@2.3 %mpich %callpath"
        prefix: /user/path

Spack resolves these dependencies against other defined external packages.
The system will error if a dependency is ambiguous (matches more than
one external) or cannot be satisfied. Dependency types are inferred from
the package recipe if not explicitly provided.

YAML `dependencies:` Configuration:
----------------------------------

For more complex or unambiguous configurations, a new `dependencies:`
block is supported. This provides more explicit control.

  packages:
    mpileaks:
      externals:
      - spec: "mpileaks@2.3"
        prefix: /user/path
        dependencies:
        - id: callpath_id
          deptypes: [link]
        - spec: mpich
          deptypes: [build, link]

Dependencies in this block can be specified by `spec:` (which must
be unambiguous) or by a unique `id:` that refers to another external
(and must also be unambiguous). This format also allows for explicit
setting of `deptypes` and `virtuals`.

Backward Compatibility (Python):
--------------------------------

For now, this change preserves the existing behavior of "stitching"
external Python extensions (e..g, `py-foo`) to a single, guessed
Python implementation if no explicit dependency is provided. This is
maintained to avoid breaking existing configurations, but users can
now use the new syntax to explicitly state the Python dependency.

Fixes spack#49697

---------

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This is a hack while we figure out why it's doing this

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
`spack info` has always shown dependencies grouped by type, but not
conditional dependency information.  This generifies the code used
to display variants and uses it for dependencies as well.

As with variants, dependencies are shown grouped by conditions, with
unconditional dependencies first.

- [x] generify when-grouping code to use a `Formatter` class
- [x] Rewrite variant code to use generic formatter.
- [x] Rewrite dependency code to use generic formatter.
- [x] add full type annotations to `cmd/info.py`

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
`spack info` has historically accepted a package name but not a spec.

Now that it shows lots of conditional information, it can be useful
to filter out variants, dependencies, versions, etc. that are irrelevant
to certain package configurations.

- [x] allow `spack info` to take a spec instead of a package name
- [x] filter `spack info` output versions, dependencies, variants, and
      licenses based on the input spec

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
After adding dependencies, it is often much clearer to list info output by name, since
there can be a very large number of dependency conditions in the output.

`--by-when` is still an option, and the `--by-name` argument is still present even
though it is the default.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
…itions

This will advise users to add, e.g., `~cuda` and `~rocm` when output for a package is
very long. This makes the feature more discoverable.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
For complex dependencies like boost, there may be many required variants. Ensure that
they don't push deptypes off the edge of the screen by setting a min width and showing
deptypes on the next line when the dependency spec is too long.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
- need to use long_spec for this

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Morten Kristensen <me@mortens.dev>
…ack#51442)

Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.3.9 to 4.0.1.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v3.3.9...v4.0.1)

---
updated-dependencies:
- dependency-name: pylint
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
spack#50905 added a few tests that are using the `builtin` repository
instead of `builtin.mock`. This is a fix to that small issue.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
…51448)

the ConcretizationCache, enabled in spack#50905, could still use a few more
simplifications.

- [x] Use `len` instead of `sum(1 ...)`
- [x] Use `WriteTransaction` and `ReadTransaction` context managers
      instead of reimplementing.
- [x] Clean up fetch a bit for better control flow

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
* spack info: emit a deprecation warning with --variants-by-name

- [x] add a `DeprecatedStoreTrueAction` to our common arguments code
- [x] use it in `spack info`
- [x] update the test for `spack info` to ensure the warning

* spack info: minor code cleanup

- [x] document max_name_len argument to _print_definition
- [x] remove unused type variables
- [x] make a comment a bit more future-proof

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
This can be merged once packages spack#342 is merge

Signed-off-by: Ryan Krattiger <ryan.krattiger@kitware.com>
* Implement direct pruning for build caches

---------

Signed-off-by: Mike VanDenburgh <michael.vandenburgh@kitware.com>
Co-authored-by: Ryan Krattiger <80296582+kwryankrattiger@users.noreply.github.com>
* CI: Install fail fast, envvar override for CI

Signed-off-by: Ryan Krattiger <ryan.krattiger@kitware.com>

* Update completions

Signed-off-by: Ryan Krattiger <ryan.krattiger@kitware.com>

* Change default to fail-fast true for CI

Signed-off-by: Ryan Krattiger <ryan.krattiger@kitware.com>

---------

Signed-off-by: Ryan Krattiger <ryan.krattiger@kitware.com>
This PR allows the use of git options, like those supported for `repos.yaml`, in `include.yaml`.

This has been tested manually using configuration files from `https://github.com/spack/spack-configs/tree/main/USC/config`.

Example (from the updated docs):

```
include:
- git: https://github.com/spack/spack-configs
  branch: main
  when: os == "centos7"
  paths:
  - USC/config/config.yaml
  - USC/config/packages.yaml
```

- [x] Add unit tests (at least of `git`) options (scopes)

---------

Signed-off-by: tldahlgren <dahlgren1@llnl.gov>
spack#51462)

Bumps ruamel-yaml from 0.18.15 to 0.18.16.

---
updated-dependencies:
- dependency-name: ruamel-yaml
  dependency-version: 0.18.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
If we do not clean up the stage, retries might use a corrupted stage:
1. Cloning a Git repository succeeds
2. Disk space runs out while copying the repository to the stage
3. Since the stage exists, a retry will simply reuse it without noticing
   that it is missing files due to the previous error

Signed-off-by: Michael Kuhn <michael.kuhn@ovgu.de>
alalazo and others added 8 commits January 9, 2026 11:14
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
…pack#51780)

Introduce unique penalties for non-default variant values, following the order of definition in package.py. This leads to deterministic concretization when the default variant value cannot be satisfied or is sub-optimal.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
* ensure the argument type is a tuple
* inline `_id` in `__str__` for a minor perf improvement
* order branch on argument type by most likely in practice to avoid a
  chain of isinstance checks
* use `type(...) is int` to remove a branch on bool that was only needed
  with `isinstance(..., int)`.
* remove redundant inheritance of `AspObject`

Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>

* diff.py: fix existing type issue list -> tuple

Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>

---------

Signed-off-by: Harmen Stoppels <me@harmenstoppels.nl>
@climbfuji climbfuji self-assigned this Jan 9, 2026
@climbfuji climbfuji force-pushed the feature/update_spack-stack-dev_from_develop branch 2 times, most recently from ccb0738 to f98e7c0 Compare January 9, 2026 22:11
@climbfuji climbfuji merged commit 6621e1e into JCSDA:spack-stack-dev Jan 21, 2026
11 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in spack-stack-2.1.x (2026 Q1) Jan 21, 2026
@climbfuji climbfuji deleted the feature/update_spack-stack-dev_from_develop branch January 21, 2026 22:36
climbfuji added a commit to JCSDA/spack-stack that referenced this pull request Jan 22, 2026
…elop (#1886)

This PR updates the spack submodule branch spack-stack-dev from the upstream spack develop. Until now, it was based on Spack v1.0.1. See JCSDA/spack#574

This update requires us to switch to the new (spack v1) syntax for declaring preferred compilers, since the blanket packages:all:require:['gcc'] (for example) no longer works for packages that don't depend on a compiler (no c, cxx, fortran dependency). While updating the common packages_<compiler>.yaml files, I removed the remaining configs/common/packages_<compiler>.yaml.NOTYETUPDATED files.

The concretizer now behaves slightly differently, and we can no longer declare external compiler runtime libraries. I opposed this for a long time, but, alas, I'll choose a different hill to die on. This had to be done for every site config. A few more tweaks to the common packages.yaml are needed to avoid duplicate packages. Note also that external packages now have to match any variants that are require:d in the environment config.

The above changes require updates to the setup-meta-modules extension, the GitHub actions workflows, and the unit tests for the spack-stack extension.

Lastly, this PR brings in a new version of bufr-query 0.0.5. Note that the concretizer in spack v1.0.1 had a bug that caused it to simply ignore bufr-query, even though it was supposed to be built (variant in jedi-base-env had default value True). The new concretizer fixed this bug, and now we do get bufr-query as part of the unified environment and the Skylab environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Re-enable CI tests after merging feature/update_to_spack_v1 into spack-stack-dev