summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-10-25Add spack short version in config variables (#47016)Jordan Galby4-14/+35
2024-10-24Env help: expand and refine subcommand help and descriptions (#47089)Tamara Dahlgren1-62/+97
This PR is in response to a question in the `environments` slack channel (https://spackpm.slack.com/archives/CMHK7MF51/p1729200068557219) about inadequate CLI help/documentation for one specific subcommand. This PR uses the approach I took for the descriptions and help for `spack test` subcommands. Namely, I use the first line of the relevant docstring as the description, which is shown per subcommand in `spack env -h`, and the entire docstring as the help. I then added, where it seemed appropriate, help. I also tweaked argument docstrings to tighten them up, make consistent with similar arguments elsewhere in the command, and elaborate when it seemed important. (The only subcommand I didn't touch is `loads`.) For example, before: ``` $ spack env update -h usage: spack env update [-hy] env positional arguments: env name or directory of the environment to activate optional arguments: -h, --help show this help message and exit -y, --yes-to-all assume "yes" is the answer to every confirmation request ``` After the changes in this PR: ``` $ spack env update -h usage: spack env update [-hy] env update the environment manifest to the latest schema format update the environment to the latest schema format, which may not be readable by older versions of spack a backup copy of the manifest is retained in case there is a need to revert this operation positional arguments: env name or directory of the environment optional arguments: -h, --help show this help message and exit -y, --yes-to-all assume "yes" is the answer to every confirmation request ``` --------- Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2024-10-24compilers.yaml: require list of strings for modules (#47197)Harmen Stoppels2-2/+5
2024-10-24Restore bold uncolored font face (#47108)Kyle Knoepfel1-1/+3
Commit aa0825d642cfa285f5f62761a0e23dc1e511d056 accidentally added a semicolon to the ANSI escape sequence even if the color code was `None` or unknown, breaking the bold, uncolored font-face. This PR restores the old behavior. --------- Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2024-10-24bootstrap: add clingo 3.13 binaries and more (#47126)Harmen Stoppels3-8/+4
2024-10-24Improve `Database.query*` methods (#47116)Massimiliano Culpo8-128/+181
* Add type hints to all query* methods * Inline docstrings * Change defaults from `any` to `None` so they can be type hinted in old Python * Pre-filter on given hashes instead of iterating over all db specs * Fix a bug where the `--origin` option of uninstall had no effect * Fix a bug where query args were not applied when searching by concrete spec Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-23env: continue to mark non-roots as implicitly installed on partial env ↵Harmen Stoppels2-11/+24
installs (#47183) Fixes a change in behavior/bug in 70412612c79af495fb2b2223edac4bd5a70a813a, where partial environment installs would mark the selected spec as explicitly installed, even if it was not a root of the environment. The desired behavior is that roots by definition are the to be explicitly installed specs. The specs on the `spack -e ... install x` command line are just filters for partial installs, so leave them implicitly installed if they aren't roots.
2024-10-23ci: Remove deprecated logic from the ci module (#47062)Scott Wittenburg7-1059/+171
ci: Remove deprecated logic from the ci module Remove the following from the ci module, schema, and tests: - deprecated ci stack and handling of old ci config - deprecated mirror handling logic - support for artifacts buildcache - support for temporary storage url
2024-10-23mypy: work around typing issues with `functools.partial` (#47160)Todd Gamblin1-5/+9
2024-10-23build(deps): bump sphinx from 7.4.7 to 8.1.3 in /lib/spack/docs (#47159)dependabot[bot]1-1/+1
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.4.7 to 8.1.3. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/v8.1.3/CHANGES.rst) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.4.7...v8.1.3) --- updated-dependencies: - dependency-name: sphinx 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>
2024-10-23Remove spurious warning, introduced in #46992 (#47152)Massimiliano Culpo1-1/+1
fixes #47135 Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-22build(deps): bump black from 24.8.0 to 24.10.0 in /lib/spack/docs (#47118)dependabot[bot]1-1/+1
Bumps [black](https://github.com/psf/black) from 24.8.0 to 24.10.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/24.8.0...24.10.0) --- updated-dependencies: - dependency-name: black 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-10-22spack arch: add --family --generic flags (#47078)Harmen Stoppels1-1/+17
This allows users to do: ``` spack install ... target=$(spack arch --target --family) spack install ... arch=$(spack arch --family) spack install ... target=$(spack arch --target --generic) spack install ... arch=$(spack arch --generic) ``` Deprecate `--generic-target` in favor of `--generic --target`
2024-10-22buildcache: recognize . and .. as paths instead of names (#47105)Harmen Stoppels3-11/+19
2024-10-21avoid double closing of fd in sub-processes (#47035)Peter Scheibel2-23/+22
Both `multiprocessing.connection.Connection.__del__` and `io.IOBase.__del__` called `os.close` on the same file descriptor. As of Python 3.13, this is an explicit warning. Ensure we close once by usef `os.fdopen(..., closefd=False)`
2024-10-21Devtools darwin (#46910)Tom Scogland1-1/+5
* stacks: add a stack for devtools on darwin After getting this whole mess building on darwin, let's keep it that way, and maybe make it so we have some non-ML darwin binaries in spack as well. * reuse: false for devtools * dtc: fix darwin dylib name and id On mac the convention is `lib<name>.<num>.dylib`, while the makefile creates a num suffixed one by default. The id in the file is also a local name rather than rewritten to the full path, this fixes both problems. * node-js: make whereis more deterministic * relocation(darwin): catch Mach-O load failure The MachO library can throw an exception rather than return no headers, this happened in an elf file in the test data of go-bootstrap. Trying catching the exception and moving on for now. May also need to look into why we're trying to rewrite an elf file. * qemu: add darwin flags to clear out warnings There's a build failure for qemu in CI, but it's invisible because of the immense mass of warning output. Explicitly specify the target macos version and remove the extraneous unknown-warning-option flag. * dtc: libyaml is also a link dependency libyaml is required at runtime to run the dtc binary, lack of it caused the ci for qemu to fail when the library wasn't found.
2024-10-21bootstrap: handle a new edge case of binary python packages with missing ↵Harmen Stoppels4-14/+37
python-venv (#47094) relevant for clingo installed without gcc-runtime and python-venv, which is done for good reasons.
2024-10-21Fix broken `spack find -u` (#47102)Massimiliano Culpo5-17/+37
fixes #47101 The bug was introduced in #33495, where `spack find was not updated, and wasn't caught by unit tests. Now a Database can accept a custom predicate to select the installation records. A unit test is added to prevent regressions. The weird convention of having `any` as a default value has been replaced by the more commonly used `None`. Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-21Modules suffixes config are now spec format strings (#38411)Jordan Galby4-4/+22
2024-10-21Docs: clarify include path options (#47083)Tamara Dahlgren1-0/+3
2024-10-19spack external find: show backtrace on error when --backtrace (#47082)Harmen Stoppels3-11/+16
2024-10-19build(deps): bump python-levenshtein in /lib/spack/docs (#46494)dependabot[bot]1-1/+1
Bumps [python-levenshtein](https://github.com/rapidfuzz/python-Levenshtein) from 0.25.1 to 0.26.0. - [Release notes](https://github.com/rapidfuzz/python-Levenshtein/releases) - [Changelog](https://github.com/rapidfuzz/python-Levenshtein/blob/main/HISTORY.md) - [Commits](https://github.com/rapidfuzz/python-Levenshtein/compare/v0.25.1...v0.26.0) --- updated-dependencies: - dependency-name: python-levenshtein 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-10-19rtd: bump sphinx-rtd-theme to 3.0.1 (#47002)Wouter Deconinck1-1/+1
2024-10-18Build logic fix: reorder definition of package module variables (#46992)John W. Parent2-4/+41
#44327 made sure to always run `set_package_py_globals` on all packages before running `setup_dependent_package` for any package, so that packages implementing the latter could depend on variables like `spack_cc` being defined. This ran into an undocumented dependency: `std_cmake_args` is set in `set_package_py_globals` and makes use of `cmake_prefix_paths` (if it is defined in the package); `py-torch`es implementation of `cmake_prefix_paths` depends on a variable set by `setup_dependent_package` (`python_platlib`). This generally restores #44327, and corrects the resulting issue by moving assignment of `std_cmake_args` to after both actions have been run.
2024-10-18implement prefix property for OneAPI compiler (#47066)Sean Koyama1-0/+20
2024-10-18fix use of traceback.format_exception (#47080)Harmen Stoppels1-1/+1
Co-authored-by: Peter Scheibel <scheibel1@llnl.gov>
2024-10-16CI RESTful Configuration (#41622)kwryankrattiger4-59/+347
* CI: Add dynamic mapping section * Doc: Add documentation for dynamic mapping section * Add missing schema property * Fixes from review * query build fix up * add warning output for dynamic mapping request errors * Cleanup ci schema * Add more protections for disabling/mitigating bad endpoints for dynamic mapping * Remove references to "gantry" in the docs * Fixup rtd header * Add unit testing for dynamic-mapping section * Add arch to dynamic-mapping query string * Tests and cleanup schema
2024-10-16unit-tests: install.py (#47007)Massimiliano Culpo1-4/+4
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-16Update release documentation (#46991)Harmen Stoppels3-120/+107
2024-10-16unit-tests: oci/integration_test.py (#47006)Massimiliano Culpo1-4/+12
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-15remove concrete spec constraint from `spack develop` (#46911)psakievich3-13/+24
Remove the constraint for concrete specs and simply take the max(version) if a version is not given. This should default to the highest infinity version which is also the logical best guess for doing development. * Remove concrete verision constriant for develop, set docs * Add unit-test * Update lib/spack/docs/environments.rst Co-authored-by: kwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com> * Update lib/spack/spack/cmd/develop.py Co-authored-by: Greg Becker <becker33@llnl.gov> * Consolidate env collection in cmd * Style --------- Co-authored-by: kwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com> Co-authored-by: Greg Becker <becker33@llnl.gov>
2024-10-15env depfile: generate Makefile with absolute script path (#46966)Tobias Ribizel2-5/+18
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-10-15Improve behavior of `spack deprecate` (#46917)Massimiliano Culpo2-0/+36
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-14Don't require OIDC initialization for noop (#46921)kwryankrattiger1-1/+1
ref. https://github.com/spack/spack-infrastructure/pull/957
2024-10-15Docs: reduce confusion in configuration override of scope precedence section ↵Tamara Dahlgren1-1/+1
(#46977)
2024-10-14detection: prefer dir instead of symlink in case of duplicate search paths ↵Harmen Stoppels2-3/+43
(#46957)
2024-10-14archspec: update to v0.2.5 (#46958)Massimiliano Culpo3-10/+96
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-14cmake: remove custom CMAKE_INSTALL_RPATH (#46685)Harmen Stoppels5-72/+37
The CMake builder in Spack actually adds incorrect rpaths. They are unfiltered and incorrectly ordered compared to what the compiler wrapper adds. There is no need to specify paths to dependencies in `CMAKE_INSTALL_RPATH` because of two reasons: 1. CMake preserves "toolchain" rpaths, which includes the rpaths injected by our compiler wrapper. 2. We use `CMAKE_INSTALL_RPATH_USE_LINK_PATH=ON`, so libraries we link to are rpath'ed automatically. However, CMake does not create install rpaths to directories in the package's own install prefix, so we set `CMAKE_INSTALL_RPATH` to the educated guess `<prefix>/{lib,lib64}`, but omit dependencies.
2024-10-14Add "only_windows" marker for unit tests (#45979)John W. Parent3-12/+16
2024-10-13Fix makefile target check with Make jobserver keep-going (#46784)Jordan Galby1-4/+13
2024-10-12Fix splicing related unit tests (#46914)Massimiliano Culpo3-5/+7
Some assertion are not testing DAG invariants, and they are passing only because of the simple structure of the builtin.mock repository on develop. Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-11libunistring: 1.2 needs std=c18 for icc, add icc C++ flags update (#37607)Stephen Sachs2-0/+12
2024-10-10Installer: rewire spliced specs via RewireTask (#39136)Nathan Hanford17-371/+872
This PR allows users to configure explicit splicing replacement of an abstract spec in the concretizer. concretizer: splice: explicit: - target: mpi replacement: mpich/abcdef transitive: true This config block would mean "for any spec that concretizes to use mpi, splice in mpich/abcdef in place of the mpi it would naturally concretize to use. See #20262, #26873, #27919, and #46382 for PRs enabling splicing in the Spec object. This PR will be the first place the splice method is used in a user-facing manner. See https://spack.readthedocs.io/en/latest/spack.html#spack.spec.Spec.splice for more information on splicing. This will allow users to reuse generic public binaries while splicing in the performant local mpi implementation on their system. In the config file, the target may be any abstract spec. The replacement must be a spec that includes an abstract hash `/abcdef`. The transitive key is optional, defaulting to true if left out. Two important items to note: 1. When writing explicit splice config, the user is in charge of ensuring that the replacement specs they use are binary compatible with whatever targets they replace. In practice, this will likely require either specific knowledge of what packages will be installed by the user's workflow, or somewhat more specific abstract "target" specs for splicing, to ensure binary compatibility. 2. Explicit splices can cause the output of the concretizer not to satisfy the input. For example, using the config above and consider a package in a binary cache `hdf5/xyzabc` that depends on mvapich2. Then the command `spack install hdf5/xyzabc` will instead install the result of splicing `mpich/abcdef` into `hdf5/xyzabc` in place of whatever mvapich2 spec it previously depended on. When this occurs, a warning message is printed `Warning: explicit splice configuration has caused the the concretized spec {concrete_spec} not to satisfy the input spec {input_spec}". Highlighted technical details of implementation: 1. This PR required modifying the installer to have two separate types of Tasks, `RewireTask` and `BuildTask`. Spliced specs are queued as `RewireTask` and standard specs are queued as `BuildTask`. Each spliced spec retains a pointer to its build_spec for provenance. If a RewireTask is dequeued and the associated `build_spec` is neither available in the install_tree nor from a binary cache, the RewireTask is requeued with a new dependency on a BuildTask for the build_spec, and BuildTasks are queued for the build spec and its dependencies. 2. Relocation is modified so that a spack binary can be simultaneously installed and rewired. This ensures that installing the build_spec is not necessary when splicing from a binary cache. 3. The splicing model is modified to more accurately represent build dependencies -- that is, spliced specs do not have build dependencies, as spliced specs are never built. Their build_specs retain the build dependencies, as they may be built as part of installing the spliced spec. 4. There were vestiges of the compiler bootstrapping logic that were not removed in #46237 because I asked alalazo to leave them in to avoid making the rebase for this PR harder than it needed to be. Those last remains are removed in this PR. Co-authored-by: Nathan Hanford <hanford1@llnl.gov> Co-authored-by: Gregory Becker <becker33@llnl.gov> Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
2024-10-10cuda: add v12.6.2 (#46864)pauleonix1-3/+3
* cuda: Add 12.6.2 * Update cuda build system - Remove gcc@6 conflict that was only a deprecation (probably has be added again with cuda@13) - Update cuda_arch support by CUDA version - Kepler support has ended with cuda@12 - Recently added 90a Hopper "experimental" features architecture was missing the dependency on cuda@12:
2024-10-10CMake: Improve incremental build speed. (#46878)psakievich1-0/+7
* CMake: Improve incremental build speed. CMake automatically embeds an updated configure step into make/ninja that will be called during the build phase. By default if a `CMakeCache.txt` file exists in the build directory CMake will use it and this + `spec.is_develop` is sufficient evidence of an incremental build. This PR removes duplicate work/expense from CMake packages when using `spack develop`. * Update cmake.py * [@spackbot] updating style on behalf of psakievich * Update cmake.py meant self not spec... --------- Co-authored-by: psakievich <psakievich@users.noreply.github.com>
2024-10-09Environment.clear: ensure clearing is passed through to manifest (#46880)Greg Becker2-0/+41
* Environment.clear: ensure clearing is passed through to manifest * test/cmd/env: make test_remove_commmand round-trip to disk * cleanup vestigial variables
2024-10-09python: rework how we compute the "command" property (#46850)Massimiliano Culpo1-0/+1
Some Windows Python installations may store the Python exe in Scripts/ rather than the base directory. Update `.command` to search in both locations on Windows. On all systems, the search is now done recursively from the search root: on Windows, that is the base install directory, and on other systems it is bin/.
2024-10-08Fix relocating MachO binary, when store projection changes (#46840)Massimiliano Culpo2-49/+49
* Remove "modify_object_macholib" According to documentation, this function is used when installing Mach-O binaries on linux. The implementation seems questionable at least, and the code seems to be never hit (Spack currently doesn't support installing Mach-O binaries on linux). * Fix relocation on macOS, when store projection changes --------- Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-10-07Windows/Testing: enable `spack view` tests on Windows (#46335)James Smillie3-9/+30
Enable tests for symlink-based views (this works with almost no modifications to the view logic). View logic is not yet robust for hardlink/junction-based views, so those are disabled for now (both in the tests and as subcommands to `spack view`).
2024-10-07Qt package: Add Windows Port (#46788)John W. Parent1-0/+11
Also adds support for Paraview and CMake to build with Qt support on Windows. The remaining edits are to enable building of Qt itself on Windows: * Several packages needed to update `.libs` to properly locate libraries on Windows * Qt needed a patch to allow it to build using a Python with a space in the path * Some Qt dependencies had not been ported to Windows yet (e.g. `harfbuzz` and `lcms`) This PR does not provide a sufficient GL for Qt to use Qt Quick2, as such Qt Quick2 is disabled on the Windows platform by this PR. --------- Co-authored-by: Dan Lipsa <dan.lipsa@kitware.com>