Separate concretization of build dependencies (iterative)#35739
Separate concretization of build dependencies (iterative)#35739alalazo wants to merge 3 commits intospack:developfrom
Conversation
This conflicts with py-shapely that requires more recent setuptools
setuptools is a pure-Python library that doesn't depend on a compiler at all (although our current Spack model has every package depend on a compiler). Does this PR support multiple versions of build deps like setuptools in the DAG, or is that a follow-up PR? |
Look closely at the small red cluster of 4 nodes in the DAG 😉 (Spoiler: there are 2 |
|
@adamjstewart Note that this approach is currently a draft, and there are competing ones that - if they get performant enough to be usable - would be preferable on the model side. |
|
Awesome! Happy to test or benchmark any of these PRs if needed, although I can't offer much help on the modeling side. |
This draft PR is a tentative implementation of the following iterative procedure to get separate concretization of build dependencies:
The basic idea is to decouple the problem and:
Step two is performed as a single "build environment" concretized with
unify: when_possibleand can have different requirements from the specs concretized at step one. In this draft, for instance, we use the default compiler for build dependencies. This allow us to concretize:$ spack graph -d --color py-shapely %oneapiand obtain the following graph (build dependencies in red):

In case we have a conflict during the solve at 2 the idea is to go back at point one with additional integrity constraints, which would prevent the offending build requirements to be in a valid solution.
Additional notes:
py-setuptools) correctly. This is because those build dependencies need to share the same compiler etc. than the underlying interpreter. Seepy-setuptoolsfor an example of that in the graph above