-
Notifications
You must be signed in to change notification settings - Fork 2.4k
concretizer: reuse + lookup cause two instances of dag-hash equivalent spec in link-run subdag #39570
Copy link
Copy link
Closed
Description
Steps to reproduce
To reproduce:
$ cd $(mktemp -d)
$ spack -c config:install_tree:root:./here install py-setuptools
$ spack -c config:install_tree:root:./here spec py-joblib ^/hash-of-just-installed-python
This somehow causes python to appear twice with a different Spec instance (different object id) in the same link-run subdag, once through the path:
py-joblib -[br]-> py-setuptools -[br]-> python
and once directly
py-joblib -[br]-> python
this confuses Spack internals that rely on id instead of dag_hash as a key.
It would be better though to ensure that id(s) == id(t) for any s and t in the link/run subdag where s.dag_hash() == t.dag_hash(), instead of duplicating the instance.
This causes problems, such as the assertion here, which doesn't traverse with dag_hash as a key:
spack/lib/spack/spack/package_base.py
Line 1231 in 143146f
| assert len(deps) == 1 |
- Spack: 0.21.0.dev0 (0e27f05)
- Python: 3.11.4
- Platform: linux-ubuntu23.04-zen2
- Concretizer: clingo
General information
- I have run
spack debug reportand reported the version of Spack/Python/Platform - I have searched the issues of this repo and believe this is not a duplicate
- I have run the failing commands in debug mode and reported the output
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Projects
Status
Done