summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-07-09Remove the "install_mockery_mutable_config" fixture (#45129)Massimiliano Culpo10-123/+42
This fixture was introduced in #16429, and made redundant in #39024
2024-07-09Fix conflicting use of `config` and `mutable_config` fixtures in unit tests ↵Massimiliano Culpo31-173/+122
(#45106) and add a fixture to detect use of conflicting fixtures
2024-07-08environments.rst: go from simple to advanced (#45004)Harmen Stoppels1-76/+86
* environments.rst: go from simple to advanced * improvements * notes about activation
2024-07-08spec.py: print right deptype in tree (#45091)Harmen Stoppels2-5/+32
Fix a bug where Spec.tree with cover=nodes reduces deptypes from all in-edges, including from nodes not reachable from the root, which almost always happens for concrete specs
2024-07-08spec.py: fix __getitem__ looking outside of dag (#45090)Harmen Stoppels2-18/+30
`Spec.__getitem__` queries dependent edges, which almost always point to nodes outside the sub-dag considered. It should only ever look at edges being traversed.
2024-07-08Add type-hints to RepoPath (#45068)Massimiliano Culpo6-89/+121
* Also, fix a bug with use_repositories + import spack.pkg
2024-07-06spack -C <env>: use env config w/o activation (#45046)Harmen Stoppels4-42/+77
Precedence: 1. Named environment 2. Anonymous environment 3. Generic directory
2024-07-05spack gc: remove debug print statement (#45067)Todd Gamblin1-1/+0
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-07-05config: fix class hierarchy (#45044)Harmen Stoppels10-124/+128
1. Avoid that `self.path` is of type `Optional[str]` 2. Simplify immutable config with a property.
2024-07-05Inject dependencies in repo classes (#45053)Massimiliano Culpo16-176/+317
2024-07-04containers: rm centos7 since EOL (#45049)Wouter Deconinck2-10/+0
2024-07-04spack audit packages: Fix message (#45045)Jordan Galby1-1/+1
Fix message formatting of the "virtual dependency cannot have variants" error.
2024-07-04Heuristic decays to default over time (#45023)Massimiliano Culpo2-11/+15
This modifies heuristic to decay to clingo default over time. The hope is that this helps with specs that have an optimal solution with a high penalty. Let target and compiler heuristic decay too, do not guess compiler
2024-07-03Add support for macOS Sequoia (#45018)Adam J. Stewart1-0/+1
2024-07-02ci: deprecate the --dependencies and --optimize option (#45005)Massimiliano Culpo7-644/+16
2024-07-02queue -> stack (#45002)Harmen Stoppels2-8/+8
2024-07-02spack_yaml.py: fix default_flow_style (#44998)Harmen Stoppels1-2/+2
2024-07-02spack_yaml: add anchorify function (#44995)Harmen Stoppels3-3/+80
This adds spack.util.spack_yaml.anchorify, which takes a non-cyclic dict/list structure, and replaces identical values with (back) references to the first instance, so that yaml serialization will use anchors. `repr` is used to identify sub-dags, which in principle is quadratic complexity in depth of the graph, but in practice the depth is O(1) so this should not matter. Then this is used in CI to reduce the size of generated YAML files to 30% of their original size.
2024-07-01cmd/develop.py: fix readability (#44980)Harmen Stoppels1-4/+7
stage[0] is assumed to be for sources, 1: and onwards is patches/resources, make that a bit more clear.
2024-07-01cuda: add v12.5.0 (#44971)Kun Wu1-2/+2
Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-07-01Docs: include cmake spec property for the command (#44956)Tamara Dahlgren1-1/+2
2024-07-01archive.py: undo unrelated changes from #43851 (#44947)Harmen Stoppels1-4/+2
2024-07-01Use composite stage also for develop specs (#44950)Harmen Stoppels3-16/+9
2024-07-01Flag propagation: restrict to link/run (#44925)Massimiliano Culpo3-81/+76
In practice people don't care about having their build dependencies reinstalled with say cflags=-O3 if that is what is set at the input spec, so restrict propagation to link/run deps only. Also simplify the encoding in asp.
2024-07-01neoverse-v1: restore py-cinemasci (#44976)Massimiliano Culpo2-4/+4
Use a different tactic for determining conflicts. Give more priority to setting False very old versions.
2024-07-01Remove DIYStage (#44949)Harmen Stoppels4-141/+9
2024-06-28installer.py: handle external roots the same (#44917)Harmen Stoppels1-16/+4
There was logic not to enqueue build requests for externals if they occur as roots. That's unnecessary.
2024-06-27Spack on Windows: fix "spack load --list" and "spack unload" (#35720)Dan Lipsa5-77/+119
Fix the following on Windows: * `spack load --list` (this printed 0 packages even if packages were loaded) * `spack unload <package>` (this said that the package is not loaded even if it was) Update unit tests for `spack load` to also run on Windows (specifically for ".bat"). This involved refactoring a few tests to parameterize based on whether the unit tests are being run on a Windows system (and to account for batch syntax).
2024-06-27Fix bug in logfile parsing (#42706)Matthew Whitlock2-1/+31
* Fix bug in logfile parsing * Cite ECMA-48 standards for CSI Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> --------- Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
2024-06-27Ensure parent runtime version >= child (#44834)Massimiliano Culpo5-28/+90
Fixes a bug where old gcc-runtime libraries would be loaded at runtime, but newer are required by dependencies, breaking the binaries.
2024-06-27build(deps): bump mypy from 1.10.0 to 1.10.1 in /lib/spack/docs (#44885)dependabot[bot]1-1/+1
Bumps [mypy](https://github.com/python/mypy) from 1.10.0 to 1.10.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.10.0...v1.10.1) --- updated-dependencies: - dependency-name: mypy 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>
2024-06-27Fix typo in docs (#44891)Miguel1-3/+3
Fixes on the rst formatting of the make_jobs
2024-06-27containers: centos:stream -> centos:stream9 (#44876)Wouter Deconinck2-8/+8
2024-06-26ASP-based solver: add a generic rule for propagation (#44870)Massimiliano Culpo2-41/+44
This adds a generic propagate/2 rule to propagate any fact to children in the DAG.
2024-06-26Simplify and improve solver heuristic (#44893)Massimiliano Culpo3-39/+23
When we changed how to deal with errors in November, we didn't realize that for an unconstrained choice rule it is more important in the heuristic to guess what is NOT in the answer set, since it will be the majority of options. Previously this was following automatically from what was in the answer set, via `1 { ... } 1` cardinality constraints. Here we improve the heuristic and the solve time for specs.
2024-06-25Steal source was not assigning the package class (#44886)psakievich1-0/+1
Fetcher was missing the package class assignment
2024-06-25Docs: Update stand-alone test information (#44755)Tamara Dahlgren1-246/+387
Update and slightly reorganize stand-alone test information to include new and improved examples and more links that can be used in PR feedback.
2024-06-25add documentation for make_jobs variable (#44838)Miguel1-0/+21
* add documentation for make_jobs variable * apply suggested changes * Update packaging_guide.rst add suggestions to the documentation * Update packaging_guide.rst fix missing quotes in the documentation * suggestions to packaging_guide.rst
2024-06-25Make url_fetch tests work on Windows (#44809)Nicole C1-3/+0
2024-06-24spec_list: do not resolve abstract hashes (#44760)Harmen Stoppels2-21/+28
2024-06-21Bugfix: test_is_externally_detectable needs to use mockpackages (#44795)Tamara Dahlgren1-2/+2
2024-06-20build_environment: fix ccache error handling (#44740)Harmen Stoppels1-4/+2
2024-06-18build(deps): bump flake8 from 7.0.0 to 7.1.0 in /lib/spack/docs (#44752)dependabot[bot]1-1/+1
2024-06-18build(deps): bump urllib3 from 2.2.1 to 2.2.2 in /lib/spack/docs (#44751)dependabot[bot]1-1/+1
2024-06-11MFEM: add new version v4.7 (#44010)Veselin Dobrev2-2/+6
* Core change: logic for extracting RPATHs from modules may return `None`: filter this out of the set of RPATHs that is auto-generated * Core change: `CachedCMakePackage` no longer adds ldflags to `CMAKE_STATIC_LINKER_FLAGS`: generally these flags are not appropriate for static linking (e.g. invocation of `ar`) * [mfem] Add version 4.7 * [mfem] Add variant for precision (single/double). Enforce consistency for precision amongst mfem and hypre/petsc/mumps dependencies * [mfem] Add cxxstd (and related constraints preventing use of old cxxstd values for newer versions of some dependencies) * [hypre] In line with prior point, added support for specifying precision * [petsc] Add config option to avoid error when building against `superlu-dist+rocm` * [hiop] add proper `raja`/`umpire`/`camp` version constraints for `hiop` versions 0.3.99-0.4.x; require `+raja` for `+rocm`, and add dependency on `hiprand` for `+rocm` * [butterflypack, mfem, strumpack, suite-sparse] Require `CRAYLIBS_{target-family}` env var to be defined * [suite-sparse] versions `@7.4:` changed install location of headers: add symlink from old location to new location * [zlib-ng] Fix error where shared libs were not successfully built for `%cce@17` (the build did not fail, but the finished `zlib-ng%cce@17` install did not have shared libs)
2024-06-11Enable and constrain reuse for GitVersion installations (#43859)psakievich3-4/+56
* Preserve higher weight for CLI git ref versions Currently the concretizer fails if you reuse a git ref version that has already been installed but modify the spec at all. See #38484 for futher diagnosis The issue here is that since there is no established provenance for these versions the highest weight they are currently assigned is that of prior install. Re-use checks then fail because the weight of the version is identical to the solver. Ironically, these versions are given the highest weights possible when specified on the CLI for the first time. They should only appear in a DAG if they are an exact match or if the user specifies them at the CLI. Therefore it makes sense to preserve their higher ordering. Getting this right is critical to moving all branch based versions to a pinned git-ref in the future. * [@spackbot] updating style on behalf of psakievich * Update lib/spack/spack/solver/asp.py Co-authored-by: Greg Becker <becker33@llnl.gov> * Add provenance specific to git ref installs * Sensitvity to name that I could not track down * Add regression test * Adjust test * Add prefer standard unit-test * Style * Add required mock * Format and mark * Make unit-test case reproduce CLI investigation * Remove unnecessary mock package * [@spackbot] updating style on behalf of psakievich * Use already developed fixture * Add zlib-ng to mocks again * Remove accidental adds * Remove maintainer * [@spackbot] updating style on behalf of psakievich * Rename test file * [@spackbot] updating style on behalf of psakievich * Remove unused imports * Update tests * [@spackbot] updating style on behalf of psakievich * Style * Update lib/spack/spack/test/concretize.py Co-authored-by: Greg Becker <becker33@llnl.gov> * Update solver rule * Duplicate installed rules for installed_git_version * Revert "Duplicate installed rules for installed_git_version" This reverts commit 17223fc8d1c9461cb87e5a230f397167d1ab6d40. --------- Co-authored-by: psakievich <psakievich@users.noreply.github.com> Co-authored-by: Greg Becker <becker33@llnl.gov>
2024-06-06build(deps): bump sphinx-design from 0.5.0 to 0.6.0 in /lib/spack/docs (#44360)dependabot[bot]1-1/+1
Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/executablebooks/sphinx-design/releases) - [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md) - [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: sphinx-design dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-06build(deps): bump pytest from 8.2.1 to 8.2.2 in /lib/spack/docs (#44553)dependabot[bot]1-1/+1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.1 to 8.2.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.2.1...8.2.2) --- updated-dependencies: - dependency-name: pytest 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>
2024-06-05spack edit: allow edit multiple files at once (#44416)Harmen Stoppels2-61/+104
2024-06-04python: make every view a `venv` (#44382)Todd Gamblin3-53/+85
#40773 introduced python-venv, which improved build isolation and avoids issues with, e.g., `ubuntu`'s system python modifying `sysconfig` to include a (very unwanted) `local` directory within the default install layout. This addresses a few cases where #40773 removed functionality, without harming the default cases where we use `python-venv`. Traditionally, *every* view with `python` in it was essentially a virtual environment, because we would copy the `python` interpreter and `os.py` into every view when linking. We now rely on `python-venv` to do that, but only when it's used (i.e. new builds) and only for packages that have an `extends("python")` directive. This again makes every view with `python` in it a virtual environment, but only if we're not already using a package like `python-venv`. This uses a different mechanism from before -- instead of using the `virtualenv` trick of copying `python` into the prefix, we instead create a `pyvenv.cfg` like `venv` (the more modern way to do it). This fixes two things: 1. If you already had an environment before Spack `v0.22` that worked, it would stop working without a reconcretize and rebuild in `v0.22`, because we no longer copy the python interpreter on link. Adding `pyvenv.cfg` fixes this in a more modern way, so old views will keep working. 2. If you have an env that only includes python packages that use `depends_on("python")` instead of `extends("python")`, those packages will now be importable as before, though they won't have the same level of build isolation you'd get with `extends` and `python-venv`. * views: avoid making client code deal with link functions Users of views and ViewDescriptors shouldn't have to deal with link functions -- they should just say what type of linking they want. - [x] views take a link_type, not a link function - [x] views work out the link function from the link type - [x] view descriptors and commands now just tell the view what they want. * python: simplify logic for avoiding pyvenv.cfg in copy views Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>