Commit Graph

7271 Commits

Author SHA1 Message Date
Harmen Stoppels
7573ea2ae5
audit: deprecate certain globals (#44895) 2024-09-13 13:21:58 +02:00
Harmen Stoppels
71df434d1f
remove self-import cycles (#46371) 2024-09-13 11:16:36 +02:00
dependabot[bot]
d8d1bc5d7e
build(deps): bump pytest from 8.3.2 to 8.3.3 in /lib/spack/docs (#46315)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.2 to 8.3.3.
- [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.3.2...8.3.3)

---
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-09-12 08:57:05 -07:00
Peter Scheibel
527e0fb4b4
bugfix: unit test broken everywhere by package change(#46344)
Openmpi provider statements were changed in #46102. The package change
was fine in and of itself, but apparently one of our tests depends on
the precise constraints used in those statements. I updated the test
to remove the checks for constraints that were removed.
2024-09-11 19:52:40 -07:00
Adam J. Stewart
5fa8890bd3
CUDA: support Grace Hopper 9.0a compute capability (#45540)
* CUDA: support Grace Hopper 9.0a compute capability

* Fix other packages

* Add type annotations

* Support ancient Python versions

* isort

* spec -> self.spec

Co-authored-by: Andrew W Elble <aweits@rit.edu>

* [@spackbot] updating style on behalf of adamjstewart

---------

Co-authored-by: Andrew W Elble <aweits@rit.edu>
Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
2024-09-11 17:43:20 +02:00
Massimiliano Culpo
ffdfa498bf
Deprecate config:install_missing_compilers (#46237)
The option config:install_missing_compilers is currently buggy,
and has been for a while. Remove it, since it won't be needed
when compilers are treated as dependencies.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-09-10 20:02:05 +02:00
Harmen Stoppels
0905edf592
r: do not create dir in setup_dependent_package (#46282) 2024-09-10 09:04:09 +02:00
Harmen Stoppels
16dba78288
spec.py: dedent format logic (#46279) 2024-09-10 09:02:37 +02:00
Harmen Stoppels
2f789f01d3
Revert "Set module variables for all packages before running setup_dependent_…" (#46283)
This reverts commit 6f08db4631.
2024-09-09 10:37:26 -07:00
Harmen Stoppels
9059756a11
reindex: do not assume fixed layout (#46170)
`spack reindex` relies on projections from configuration to locate
installed specs and prefixes. This is problematic because config can
change over time, and we have reasons to do so when turning compilers
into depedencies (removing `{compiler.name}-{compiler.version}` from
projections)

This commit makes reindex recursively search for .spack/ metadirs.
2024-09-09 17:26:30 +02:00
Jordan Galby
2502a3c2b6
Fix regression in spec format string for indiviual variants (#46206)
Fix a regression in {variants.X} and {variants.X.value} spec format strings.
2024-09-09 10:42:04 +02:00
Dan Lipsa
6f08db4631
Set module variables for all packages before running setup_dependent_package (#44327)
When a package is running `setup_dependent_package` on a parent, ensure
that module variables like `spack_cc` are available. This was often
true prior to this commit, but externals were an exception.

---------

Co-authored-by: John Parent <john.parent@kitware.com>
2024-09-06 18:54:09 -06:00
Massimiliano Culpo
a3fa54812f
Remove deprecated config options (#44061)
These options have been deprecated in v0.21, and
slated for removal in v0.23
2024-09-06 15:14:36 -06:00
Peter Scheibel
78a4d3e7d2
Mixed-source cflags (#41049)
Allow flags from different sources (compilers, `require:`, command-line
specs, and `depends_on`) to be merged together, and enforce a consistent
order among them.

The order is based on the sources, e.g. flags on specs from the command
line always come last. Some flag order consistency issues are fixed:

1. Flags from `compilers.yaml` and the command line were always intra- and
   inter-source order consistent.
2. Flags from dependents and packages.yaml (introduced via `require:`)
   were not: for `-a -b` from one source and `-c` from another, the final
   result might rearrange `-a -b`, and would also be inconsistent in terms
   of whether `-c` came before or after.

(1) is/was handled by going back to the original source, i.e., flags are
retrieved directly from the command line spec rather than the solver.

(2) is addressed by:

* Keeping track of grouped flags in the solver
* Keeping track of flag sources in the solver on a per-flag basis

The latter info is used in this PR to enforce DAG ordering on flags
applied from multiple dependents to the same package, e.g., for this
graph:

```
   a
  /|\
 b | c
  \|/
   d
```

If `a`, `b`, and `c` impose flags on `d`, the combined flags on `d` will
contain the flags of `a`, `b`, and `c` -- in that order. 

Conflicting flags are allowed (e.g. -O2 and -O3). `Spec.satisifes()` has
been updated such that X satisfies Y as long as X has *at least* all of
the flags that Y has. This is also true in the solver constraints.
`.satisfies` does not account for how order can change behavior (so
`-O2 -O3` can satisfy `-O3 -O2`); it is expected that this can be
addressed later (e.g. by prohibiting flag conflicts).

`Spec.constrain` and `.intersects` have been updated to be consistent
with this new definition of `.satisfies`.
2024-09-06 10:37:33 -07:00
John W. Parent
4042afaa99
Bootstrap GnuPG and file on Windows (#41810)
Spack can now bootstrap two new dependencies on Windows: GnuPG, and file. 

These dependencies are modeled as a separate package, and they install a cross-compiled binary.
Details on how they binaries are built are in https://github.com/spack/windows-bootstrap-resources
2024-09-06 14:26:46 +02:00
Harmen Stoppels
7fdf1029b7
fish: use shlex.quote instead of custom quote (#46251) 2024-09-06 11:38:14 +00:00
Harmen Stoppels
7c473937ba
db: more type hints (#46242) 2024-09-06 09:13:14 +02:00
Massimiliano Culpo
9a8bff01ad
Allow deprecating more than one property in config (#46221)
* Allow deprecating more than one property in config

This internal change allows the customization of errors
and warnings to be printed when deprecating a property.

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

* fix

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

* Use a list comprehension for "issues"

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

---------

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-09-05 15:33:20 -07:00
Nicole C.
434a703bcf
Windows: Update pytest with echo and remove others (#45620)
* Windows: Update pytest with echo and remove others

* Fix style

* Remove unused pytest import in undevelop

* Update test_test_part_pass to be Window compatible

* Style
2024-09-05 15:34:19 -05:00
Massimiliano Culpo
c4d18671fe
Avoid best-effort expansion of stacks (#40792)
fixes #40791

Currently stacks behave differently if used in unify:false
environments, which leads to inconsistencies during concretization.

For instance, we might have two abstract user specs that do not
intersect with each other map to the same concrete spec in the
environment. This is clearly wrong.

This PR removes the best effort expansion, so that user specs
are always applied strictly.
2024-09-05 10:32:15 -06:00
Harmen Stoppels
02faa7b97e
reindex: ensure database is empty before reindex (#46199)
fixes two tests that did not clear the in-memory bits of a database
before calling reindex.
2024-09-05 14:53:29 +02:00
Harmen Stoppels
7e5e6f2833
Pass Database layout in constructor (#46219)
Ensures that Database instances do not reference a global
`spack.store.STORE.layout`. Simplify Database.{add,reindex} signature.
2024-09-05 10:49:03 +00:00
Massimiliano Culpo
37ea9657cf
Remove test_external_package_module (#46218)
This test was possibly meant for the Cray platform, and
currently is a no-op.

Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-09-05 12:10:59 +02:00
Harmen Stoppels
2107a88514
spack deprecate: deprecate --link-type flag (#46202) 2024-09-05 11:06:46 +02:00
Massimiliano Culpo
9e18e63053
solver: minor cleanup and optimization (#46176)
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
2024-09-03 10:35:54 +00:00
Harmen Stoppels
069286bda7
database: remove a few class properties (#46175) 2024-09-03 11:22:14 +02:00
Harmen Stoppels
fe2d06399f
db: type hints (#46168) 2024-09-02 14:44:49 +02:00
Harmen Stoppels
b5dec35113
projections: simplify expression (#46167) 2024-09-02 12:38:47 +00:00
Harmen Stoppels
20565ba8ab
remove dead code: fs.is_writable_dir was used on file (#46166) 2024-09-02 11:55:40 +00:00
Wouter Deconinck
c47a3ee05b
package_base: sort deprecated versions later in preferred_version (#46025) 2024-09-02 10:42:15 +00:00
pauleonix
6b649ccf4f
cuda: add v12.6.1 (#46143)
Update build system conflict between CUDA 12.6 and Clang 18
2024-09-02 08:46:03 +02:00
Georgia Stuart
d463d4566d
docs: update conditional definition arch (#46139)
Signed-off-by: Georgia Stuart <gstuart@umass.edu>

Co-authored-by: Jordan Galby <67924449+Jordan474@users.noreply.github.com>
2024-09-02 08:32:26 +02:00
Harmen Stoppels
f7de621d0c
Remove redundant inspect.getmodule(self) idiom in packages (#46073) 2024-09-01 11:25:51 +02:00
Massimiliano Culpo
c283fce487
Remove DetectedPackage class (#46071)
This PR simplifies the code doing external spec detection by removing 
the `DetectedPackage` class. Now, functions accepting or returning lists 
of `DetectedPackage`, will accept or return list of specs.

Performance doesn't seem to change if we use `Spec.__reduce__` instead 
of `DetectionPackage.__reduce__`.
2024-08-30 08:11:17 +00:00
Chris Marsh
cade66d842
CMakePackage: Set policy CMP0042 NEW on macos (#46114)
so linking to shared libraries works well at runtime on darwin for all packages with cmake_minimum_required < 3.
2024-08-29 18:49:53 +00:00
Harmen Stoppels
dc3f5cd606
windows_establish_runtime_linkage: post install hook (#46103) 2024-08-29 17:16:36 +02:00
Tamara Dahlgren
b6ff126494
Executable: make the timeout message readable (#46098) 2024-08-29 11:46:15 +00:00
Massimiliano Culpo
f9065f0c7e
Remove "get_compiler_duplicates" (#46077)
This function is used only in tests.
2024-08-29 06:53:17 +02:00
Jordan Galby
4c91e6245c
Don't check checksums on spack-develop packages (#46076)
Fix regression introduced in spack 0.22.1 where Spack would ask about checksums
on spack-develop packages.
2024-08-28 17:07:30 +00:00
Jordan Galby
6b0011c8f1
For "when:" and install_environment.json: Support fully qualified hostname (#45522) 2024-08-28 18:38:54 +02:00
Harmen Stoppels
85487f23bc
buildcache.py: elide string not spec (#46074) 2024-08-28 15:27:44 +02:00
Harmen Stoppels
fb4811ec3f
Drop now redundant use of inspect (#46057)
inspect.isclass -> isinstance(..., type)
inspect.getmro -> cls.__mro__
2024-08-28 14:35:08 +02:00
Massimiliano Culpo
25ba3124bd
Spec.from_detection now accounts for external prefix (#46063)
Change the signature of Spec.from_detection to set the
external prefix, and the external modules, if they are
present.

Delete "spack.package_prefs.spec_externals" since it
is unused.
2024-08-28 10:51:36 +02:00
Massimiliano Culpo
df57e1ceb3
Remove llnl.util.lang.has_method, use built-in hasattr instead (#46072) 2024-08-28 10:17:12 +02:00
Harmen Stoppels
9d8f94a7c8
spack_yaml: delete custom deepcopy (#46048) 2024-08-27 18:45:44 +02:00
Massimiliano Culpo
1297673a70
Remove "prevent_cray_detection" context manager (#46060)
This context manager was used to prevent detecting a platform
as "cray". Since now Cray machines are detected as linux, we can
remove the context manager.
2024-08-27 18:43:07 +02:00
Harmen Stoppels
0fee2c234e
config.py: tell don't ask (#46040) 2024-08-27 15:55:44 +02:00
Massimiliano Culpo
394e6159d6
Remove a few unused classes and globals (#46054) 2024-08-27 15:06:39 +02:00
Massimiliano Culpo
9a91f021a7
Move spack.compilers._to_dict to Compiler (#46051) 2024-08-27 14:01:50 +02:00
Harmen Stoppels
297e43b097
abi.py: remove (#46047) 2024-08-27 10:38:54 +02:00
Harmen Stoppels
a60d1084b1
jsonschema: remove optional deps (#46041) 2024-08-26 22:15:52 +02:00
Harmen Stoppels
497e19f0e3
distro.py: avoid excessive stat calls (#46030) 2024-08-26 18:55:55 +02:00
pauleonix
8c92836c39
cuda: add v12.6 (#45558) 2024-08-26 15:27:07 +02:00
Todd Gamblin
1d70ab934c
ci generate: don't warn when no cdash config (#46004)
Right now if you run `spack ci generate` you get a warning about CDash credentials even
if there's no CDash configuration specified. We should only warn if there was actually a
CDash config.

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-26 13:58:41 +02:00
Harmen Stoppels
02f329a8af
compilers: avoid redundant fs operations and cache (#46031) 2024-08-26 12:49:58 +02:00
Harmen Stoppels
94c99fc5d4
variant.py: extract spec bits into spec.py (#45941) 2024-08-24 09:45:23 +02:00
John W. Parent
1f1021a47f
PythonExtension: use different bin dir on Windows (#45427) 2024-08-24 09:34:24 +02:00
Harmen Stoppels
296e5308a7
mirror: fetch by digest (#45809)
Source mirrors store entries by digest and add a human readable alias of the
form 'name-version'. If no digest is available, the alias is used as the primary
storage location.

Spack erroneously fetches by alias when the digest path does not exist. This is
problematic if `version(..., sha256=...)` changes in package.py, and the mirror
is populated with the old shasum. That would result in an error when a digest
is available, but in case of git versions with a modified commit sha, the wrong
sources would be fetched without error. With this PR, only the digest path is
used, not the alias, in case a digest is available. This is also a small performance
optimization, as the number of request is halved for mirrors that don't contain
the sources.

Further, for git sources the tag was used as a digest, but this is a moving
target. Only commit sha is used now.

Also whenever the alias already existed, Spack used to keep it in place when
updating the mirror cache, which means that aliases would always point to
outdated mirror entries whenever digests are modified. With this PR the alias
is moved in place.

Lastly, fix a recent regression where `Stage.disable_mirrors` disabled mirrors
but not the local download cache, which was the intention.
2024-08-24 09:09:25 +02:00
Massimiliano Culpo
47e79c32fd
Substitute __import__ with importlib.import_module (#45965) 2024-08-23 21:41:26 +02:00
Harmen Stoppels
b8cbbb8e2e
spack create: add depends_on(<lang>) statements (#45296) 2024-08-23 10:33:05 +02:00
Harmen Stoppels
d40f847497
Add missing MultiMethodMeta metaclass in builders (#45879)
* Add missing MultiMethodMeta metaclass in builders

and remove the Python 2 fallback option in favor of hard errors to catch
similar issues going forward.

The fallback option can cause about 10K stat calls due to use of
`realpath` in the inspect module, depending on how deep Spack itself is
nested in the file system, which is ... undesirable.

* code shuffling to avoid circular import

* more reshuffling

* move reserved variant names into variants module
2024-08-23 09:23:25 +02:00
Massimiliano Culpo
ead25b1e9e
Add a new audit to find missing package.py files (#45868)
* Add a new audit to find missing package.py files

* Remove directory without package.py
2024-08-22 14:22:54 -07:00
Nicole C.
1bcb1fcebc
Windows: port tests for mirror/blame (#45259) 2024-08-22 09:49:32 -07:00
Massimiliano Culpo
836be2364c
Make spack compiler find use external find (#45784)
so that there is no duplicate detection logic for compilers
2024-08-22 12:13:08 +02:00
John W. Parent
182bc87fe1
Windows: Port icu4c; define cxx std flags for MSVC (#45547)
* Adds an MSBuild system + Builder to the icu4c package
* Adds custom install method as MSBuild system does not vendor an
  install target
* The cxxstd variant is not supported on Windows (there are no config
  options you use to tell the build system what cxx standard to
  build against), so the variant definition was updated to occur
  everywhere except Windows

Also, this commit defines the c/cxx..._flag properties of the MSVC
compiler (although they are not used by `icu4c` and not strictly
necessary to bundle with this PR).
2024-08-21 16:08:57 -06:00
Greg Becker
c1736077bb
spack bootstrap status --dev: function call for new interface (#45822) 2024-08-20 13:04:39 +00:00
psakievich
85905959dc
Increase min version for sparse_checkout (#45818)
* Increase min version for sparse_checkout

* Update git_fetch.py

* style
2024-08-20 13:04:23 +00:00
Harmen Stoppels
2ae5596e92
Unify url and oci buildcache push code paths (#45776) 2024-08-20 13:17:49 +02:00
Harmen Stoppels
ac9398ed21
build_environment: explicitly disable ccache if disabled (#45275) 2024-08-19 13:49:38 +02:00
Harmen Stoppels
57769fac7d
Simplify URLFetchStrategy (#45741) 2024-08-19 11:34:13 +02:00
Alec Scott
428b4e340a
Remove deprecated --safe-only in spack version cmd (#45765) 2024-08-19 08:28:19 +02:00
Wouter Deconinck
553cc3b70a
util/web.py: parse new GitLab JS dropdown links (#45764)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2024-08-17 09:02:03 +02:00
Greg Becker
9ec8eaa0d3
include_concrete: read from older env formats properly (#45766)
* include_concrete: read from older env formats properly
* spack env rm: fix logic for checking env includes
* regression test

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-16 20:40:41 +00:00
James Smillie
cc7a29c55a
Windows: fix stage cleaning for long paths (#45786)
Paths over 260 characters in length are not handled by `shutil.rmtree`
unless they use the extended-length path syntax (using a prefix of
"\\?\").

This fixes an issue where stage cleaning fails when paths in a stage
exceed the normal 260-character limit.

This indicates that other parts of the codebase should be examined/
refactored to handle long paths.
2024-08-16 11:16:13 -07:00
Harmen Stoppels
54b57c5d1e
Revert "Change environment modifications to escape with double quotes (#36789)" (#42780)
This reverts commit 690394fabc, as it causes arbitrary code execution.
2024-08-16 17:32:48 +02:00
Harmen Stoppels
725ef8f5c8
oci: support --only=package (#45775)
Previously `spack buildcache push --only=package` errored in the OCI
case, but it's been requested that OCI can be used as pure storage w/o
the need for runnable container images.

This commit makes it so that

1. manifests refer only to runtime dependencies that were selected to be
   pushed
2. failure to upload a blob among the selected specs does not prevent a
   manifest/tag to be created for dependents: they just don't refer to
   the missing blob as a layer/dependency

This fixes the following issues:

1. dependents of non-redistributable specs can now be pushed to oci
   build caches without error
2. failure to upload one tarball does not cause cascading failures for
   dependents whose tarballs do upload succesfully -- so it's better
   best-effort behavior
3. for some people uploading with deps caused a massive amount of
   fetches of their manifests (which certain registries count as a
   download of an image, even though their layers are not fetched) --
   being able to specify --only=package reduces the number of fetches.
2024-08-16 15:24:04 +02:00
Harmen Stoppels
f51a9a9107
stage: provide mirrors in constructor (#45792)
Stage objects create mirrors ad-hoc from current config.

- There is no way to prevent mirrors from being used
- There is no way to restrict mirrors to source/binary, which is of
  course context dependent.
- Stage is also used in build caches, where iterating over mirrors is
  already implemented differently, and wouldn't work anyways cause it's
  source only, and in particular it makes no sense for OCI build caches.

This commit:

1. Injects the sensible mirrors into the stage object from contexts
   where it is relevant
2. Separates mirrors from cache, so that w/o mirrors download cache can
   still be used
2024-08-16 15:21:47 +02:00
Massimiliano Culpo
4f0e336ed0 Remove "test_foreground_background" 2024-08-16 14:22:59 +02:00
Massimiliano Culpo
64774f3015 Skip test_foreground_background + other minor cleanups
The test_foreground_background unit test has been marked
xfail for a while, meaning:
- Nobody looks at the results of the test
- It still runs every time

That test happens to hang frequently on some Apple M1 I have access to,
so here I mark it as skip.

Also went through other xfailing and skipped tests, and applied minor changes.
2024-08-16 14:22:59 +02:00
Massimiliano Culpo
4e9fbca033
Clean up test/cmd/ci.py (#45774)
* Use absolute paths instead of https:// fake mirrors (this speed-up tests by avoiding requests)
* Add a fixture to gather in a single place code that is copy/pasted in a lot of tests
* General clean-up of tests and repeated code

Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2024-08-16 13:42:01 +02:00
Massimiliano Culpo
165c171659
Update archspec to v0.2.5-dev (7e6740012b897ae4a950f0bba7e9726b767e921f) (#45721) 2024-08-15 19:49:07 +02:00
psakievich
1b82779087
Add options for sparse checkout in GitFetcher (#45473)
* Add options for sparse checkout in GitFetcher

Newer versions of git have a beta feature called sparse checkout
that allow users to check out a portion of a large repo.

This feature will be ideal for monolithic repo projects that want to
model their infrastructure via spack.  This PR implements an addition
to the GitFetcher that allows users to add a `git_sparse_paths`
attribute to package classes or versions which will then use sparse
checkout on those directories/files for the package.

* Style

* Split git clone into multiple functions

* Add sparse-checkout impl

* Internalize src clone functions

* Docs

* Adding sparse clone test

* Add test for partial clone

* [@spackbot] updating style on behalf of psakievich

* Small fixes

* Restore default branch status

* Fix attributes for package

* Update lib/spack/docs/packaging_guide.rst

Co-authored-by: Matthew Mosby <44072882+mdmosby@users.noreply.github.com>

* Extend unit test to multiple git versions

* style

---------

Co-authored-by: psakievich <psakievich@users.noreply.github.com>
Co-authored-by: Matthew Mosby <44072882+mdmosby@users.noreply.github.com>
2024-08-15 05:28:34 +00:00
Greg Becker
f42486b684
spack info: use spec fullname (#45753) 2024-08-14 22:00:00 +00:00
Greg Becker
2b6bdc7013
OneapiPackage: do not use getpass.getuser (#45727)
* OneapiPackage: do not use getpass.getuser
2024-08-14 09:48:44 -07:00
Massimiliano Culpo
586a35be43
SpecHashDescriptor: better repr in debugger (#45739) 2024-08-14 18:02:09 +02:00
Harmen Stoppels
29b50527a6
spack buildcache push: parallel in general (#45682)
Make spack buildcache push for the non-oci case also parallel, and --update-index more efficieny
2024-08-14 17:19:45 +02:00
Massimiliano Culpo
94961ffe0a
Optimize marshaling of Repo and RepoPath (#45742)
When sending Repo and RepoPath over to a child process,
we go through a marshaling procedure with pickle. The
default behavior for these classes is highly inefficient,
as it serializes a lot of specs that can just be
reconstructed on the other end of the pipe.

Here we write optimized procedures to __reduce__ both
classes.
2024-08-14 14:34:35 +02:00
Massimiliano Culpo
03a7da1e44
Micro-optimize finding executables (#45740) 2024-08-14 13:52:28 +02:00
Massimiliano Culpo
97ffe2e575
Add schema for compiler options in packages.yaml (#45738) 2024-08-14 11:47:36 +02:00
Harmen Stoppels
7b10aae356
Show underlying errors on fetch failure (#45714)
- unwrap/flatten nested exceptions
- improve tests
- unify curl lookup
2024-08-14 08:15:15 +00:00
Tamara Dahlgren
8ba6e7eed2
Bugfix: allow test_* build-time and stand-alone tests (#45699) 2024-08-13 16:58:00 -07:00
Massimiliano Culpo
7001a2a65a
Fix a bug with automatic tag detection (#45696)
Extracted from #45638

When adding the "detectable" tag to a package class that has the
"tag" attribute inherited from a base class, we need to copy it to
avoid modifying the base class.
2024-08-13 10:19:26 +02:00
Harmen Stoppels
a66586d749
spack buildcache push: best effort (#45631)
"spack buildcache push" for partially installed environments pushes all it 
can by default, and only dumps errors towards the end.

If --fail-fast is provided, error out before pushing anything if any
of the packages is uninstalled

oci build caches using parallel push now use futures to ensure pushing
goes in best-effort style.
2024-08-13 08:12:48 +02:00
Nicole C.
27557a133b
debug: Update cmd and test for Windows (#45309)
* debug: Update cmd and test for Windows

* Add comment tar options not supported by Win tar
2024-08-12 15:50:51 -04:00
Harmen Stoppels
3b59817ea7
deal with TimeoutError from ssl.py (#45683) 2024-08-12 13:06:13 +02:00
Harmen Stoppels
7ddc886d6d
buildcache: fix hard-coded, outdated layout version (#45645) 2024-08-12 09:25:31 +02:00
Massimiliano Culpo
2079b888c8
Remove the old concretizer (#45215)
The old concretizer is still used to bootstrap clingo from source. If we switch to a DAG model
where compilers are treated as nodes, we need to either:

1. fix the old concretizer to support this (which is a lot of work and possibly research), or
2. bootstrap `clingo` without the old concretizer.

This PR takes the second approach and gets rid of the old concretizer code. To bootstrap
`clingo`, we store some concrete spec prototypes as JSON, select one according to the
coarse-grained system architecture, and tweak them according to the current host.

The old concretizer and related dead code are removed.  In particular, this removes
`Spec.normalize()` and related methods, which were used in many unit-tests to set
up the test context. The tests have been updated not to use `normalize()`.

- [x] Bootstrap clingo concretization based on a JSON file
- [x] Bootstrap clingo *before* patchelf
- [x] Remove any use of the old concretizer, including:
      * Remove only_clingo and only_original fixtures
      * Remove _old_concretize and _new_concretize
      * Remove _concretize_together_old
      * Remove _concretize_together_new
      * Remove any use of `SPACK_TEST_SOLVER`
      * Simplify CI jobs
- [x] ensure bootstrapping `clingo` works on on Darwin and Windows
- [x] Raise an intelligible error when a compiler is missing
- [x] Ensure bootstrapping works on FreeBSD
- [x] remove normalize and related methods

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-10 16:12:27 -07:00
Greg Becker
7a83cdbcc7
Concretizer should respect namespace of reused specs (#45538)
* concretize.lp: improve coverage of internal_error facts
* concretizer: track namespaces for reused packages
* regression test
2024-08-09 13:51:34 -07:00
Dominic Hofer
da33c12ad4
Remove execution permission from setup-env.sh (#45641)
`setup-env.sh` is meant to be sourced, not executed directly.
By revoking execution permissions, users who accidentally execute
the script will receive an error instead of seeing no effect.

* Remove execution permission from `setup-env.sh` and friends
* Don't make output file executable in `spack commands --update-completion`

---------

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
2024-08-09 13:27:07 -07:00
Massimiliano Culpo
007c1148c0
Remove Compiler.PrgEnv* attributes (#45615) 2024-08-08 18:15:42 +02:00