Commit Graph

26090 Commits

Author SHA1 Message Date
Gregory Becker
8824040eda conflicts: better message for conflicts with no when= 2022-05-19 12:00:09 -07:00
Gregory Becker
d744b83584 error messages: prefix error facts with error_ 2022-05-19 11:01:34 -07:00
Gregory Becker
14601b59ef missing self argument 2022-05-19 09:55:48 -07:00
Gregory Becker
8d7360106f internal_error: minor refactor for clarity 2022-05-19 09:52:31 -07:00
Gregory Becker
881f184eab version selection: improve comment 2022-05-19 09:34:40 -07:00
Gregory Becker
63bec85a24 version_unsatisfiable: improve comments 2022-05-19 09:32:06 -07:00
Gregory Becker
159975a561 concretizer: improve comments on one-sided comparisons 2022-05-19 09:17:56 -07:00
Gregory Becker
25ba7d071a error message for unsatisfiable compiler version 2022-05-18 16:37:06 -07:00
Gregory Becker
54b79d5661 cleanup virtual versions 2022-05-18 15:07:06 -07:00
Gregory Becker
235f93c241 cleanup error code in concretize.lp 2022-05-18 12:59:06 -07:00
Gregory Becker
a73c5ffb0b flake 2022-05-17 13:36:15 -07:00
Gregory Becker
ce53ce284b error messages: use production quality messages 2022-05-17 11:11:50 -07:00
Gregory Becker
ae68318475 update test for new error messages 2022-05-16 17:01:26 -07:00
Gregory Becker
bd63c19b94 ensure error messages evaluated first 2022-05-16 14:54:53 -07:00
Gregory Becker
3f3bcacd16 flake 2022-05-16 12:20:30 -07:00
Gregory Becker
d349d4ab0b internal errors: request bug report and give debug-level output automatically 2022-05-16 10:41:50 -07:00
Gregory Becker
e61b3c96f6 concretizer tests: clean up temporary values 2022-05-16 10:36:23 -07:00
Gregory Becker
bcbb0a3b85 concretizer: cleanup commented-out code 2022-05-16 10:28:27 -07:00
Gregory Becker
3c556ab318 cleanup, remove show-cores option 2022-05-16 10:20:35 -07:00
Gregory Becker
563ae5188e improve multiple-variant-value error 2022-05-15 11:59:58 -07:00
Gregory Becker
f4b3561f71 wip try without unsat cores 2022-05-13 17:08:26 -07:00
Gregory Becker
0748a1b290 fix version weight 2022-05-13 16:36:56 -07:00
Gregory Becker
0bfece0c5e fix platform errors 2022-05-13 16:23:58 -07:00
Gregory Becker
6e9b16279a wip 2022-05-13 12:25:57 -07:00
Gregory Becker
cf71baff30 refactor calculation of assumption_names 2022-05-13 12:25:57 -07:00
Gregory Becker
b9831acb44 solver: messages for dependency conditions 2022-05-13 12:25:57 -07:00
Gregory Becker
5f2edb1860 fixup 2022-05-13 12:25:57 -07:00
Gregory Becker
8b6809cf66 solver: bypass conditional logic for unconditional variants
add message to variant conditionals
2022-05-13 12:25:57 -07:00
Gregory Becker
a93a4274aa solver: add messages to variant_value/provider/external conditions 2022-05-13 12:25:57 -07:00
Gregory Becker
59bb42ee7f solver: add messages to conditions for conflict triggers/constraints 2022-05-13 12:25:57 -07:00
Gregory Becker
11d382bff1 show-cores: fewer modes required 2022-05-13 12:25:57 -07:00
Gregory Becker
57889ec446 solver: orthogonalize variant_value maxima and minima 2022-05-13 12:25:57 -07:00
Gregory Becker
66bda49c44 solver: rework which facts are assumptions 2022-05-13 12:25:57 -07:00
Gregory Becker
94a2ab5359 solver: error -> internal_error for errors that should not be exposed generally 2022-05-13 12:25:56 -07:00
Gregory Becker
6d0044f703 solver: rename version_satisfies/2 to node_version_satisfies/2 for clarity 2022-05-13 12:25:56 -07:00
Gregory Becker
3fa447a84a solver: clean up emission of conflicts 2022-05-13 12:25:56 -07:00
Gregory Becker
d501ce0c7e remove special handling for error/rule atoms 2022-05-13 12:25:56 -07:00
Todd Gamblin
5cb40cbcd2 directory_layout: remove outdated checks for old DAG hash
We previously had checks in `directory_layout` to check for build-dependency
conflicts when we weren't storing build dependencies.  We don't need
those anymore; we can just rely on the DAG hash now that it includes everything
we know about each spec.

- [x] Remove vestigial code for checking installed spec against concrete spec
      in `ensure_installed()`
- [x] Remove `SpecHashCollisionError` -- if specs have the same hash now, they're
      the same as far as `DirectoryLayout` should be concerned.
- [x] Convert spec comparison to `dag_hash()` comparison when adding extensions.
2022-05-13 10:45:12 -07:00
Todd Gamblin
c93e465134 full hash: fix uninstall and gc with full hash DB
The database now stores full hashes, so we need to adjust the criteria we use to
determine if something can be uninstalled. Specifically, it's ok to uninstall thing that
have remaining build-only dependents.
2022-05-13 10:45:12 -07:00
Todd Gamblin
521c206030 concretizer: enable hash reuse with full hash
With the original DAG hash, we did not store build dependencies in the database, but
with the full DAG hash, we do. Previously, we'd never tell the concretizer about build
dependencies of things used by hash, because we never had them. Now, we have to avoid
telling the concretizer about them, or they'll unnecessarily constrain build
dependencies for new concretizations.

- [x] Make database track all dependencies included in the `dag_hash`
- [x] Modify spec_clauses so that build dependency information is optional
      and off by default.
- [x] `spack diff` asks `spec_clauses` for build dependencies for completeness
- [x] Modify `concretize.lp` so that reuse optimization doesn't affect fresh
      installations.
- [x] Modify concretizer setup so that it does *not* prioritize installed versions
      over package versions. We don't need this with reuse, so they're low priority.
- [x] Fix `test_installed_deps` for full hash and new concretizer (does not work
      for old concretizer with full hash -- leave this for later if we need it)
- [x] Move `test_installed_deps` mock packages to `builtin.mock` for easier debugging
      with `spack -m`.
- [x] Fix `test_reuse_installed_packages_when_package_def_changes` for full hash
2022-05-13 10:45:12 -07:00
Todd Gamblin
15eb98368d bugfix: tests trying to ignore package changes should use build_hash
- [x] update test to use `build_hash` instead of `dag_hash`, as we're testing for
      graph structure, and specifically NOT testing for package changes.
- [x] make hash descriptors callable on specs to simplify syntax for invoking them
- [x] make `Spec.spec_hash()` public
2022-05-13 10:45:12 -07:00
Todd Gamblin
7c1d566959 Remove all uses of runtime_hash; document lockfile formats and fix tests
This removes all but one usage of runtime hash. The runtime hash was being used to write
historical lockfiles for tests, but we don't need it for that; we can just save those
lockfiles.

- [x] add legacy lockfiles for v1, v2, v3
- [x] fix bugs with v1 lockfile tests (the dummy lockfile we were writing was not actually
      a v1 lockfile because it used the new spec file format).
- [x] remove all but one runtime_hash usage -- that one needs a small rework of the
      concretizer to really fix, as it's about separate concretization of build
      dependencies.
- [x] Document the history of the lockfile format in `environment/__init__.py`
2022-05-13 10:45:12 -07:00
Todd Gamblin
7ab46e26b5 content_hash(): make it work on abstract specs
Some test cases had to be modified in a kludgy way so that abstract specs made
concrete would have versions on them. We shouldn't *need* to do this, as the
only reason we care is because the content hash has to be able to get an archive
for a version.

This modifies the content hash so that it can be called on abstract specs,
including only relevant content.

This does NOT add a partial content hash to the DAG hash, as we do not really
want that -- we don't need in-memory spec hashes to need to load package files.
It just makes `Package.content_hash()` less prickly and tests easier to
understand.
2022-05-13 10:45:12 -07:00
Todd Gamblin
6db215dd89 spec: fix serialization, avoid double call to node_dict_with_hashes 2022-05-13 10:45:12 -07:00
Todd Gamblin
72b38851eb hashes: revert spack monitor hash changes to preserve original protocol
`spack monitor` expects a field called `spec_full_hash`, so we shouldn't change that.
Instead, we can pass a `dag_hash` (which is now the full hash) but not change the field
name.
2022-05-13 10:45:12 -07:00
Todd Gamblin
9d9e970367 fix full hash calls in spack graph 2022-05-13 10:45:12 -07:00
Todd Gamblin
283a4e6068 remove no longer needed full hash check 2022-05-13 10:45:12 -07:00
Todd Gamblin
d20cc7b124 spec: remove hashes_final as it's no longer needed.
`hashes_final` was used to indicate when a spec was concrete but possibly lacked
`full_hash` or `build_hash` fields. This was only necessary because older Spacks
didn't generate them, and we want to avoid recomputing them, as we likely do not
have the same package files as existed at concretization time.

Now, we don't need to do that -- there is only the DAG hash and specs are either
concrete and have a `dag_hash`, or not concrete and have no `dag_hash`. There's
no middle ground.
2022-05-13 10:45:12 -07:00
Scott Wittenburg
0dd373846f gitlab ci: switch over to new bucket for all stacks 2022-05-13 10:45:12 -07:00
Scott Wittenburg
c202953528 gitlab ci: Docstring methods or make them private 2022-05-13 10:45:12 -07:00