Copy env file and directory to support includes#138
Copy env file and directory to support includes#138adrienbernede wants to merge 5 commits intomainfrom
Conversation
|
This doesn't appear to cause any issues in Serac, but I am worried there may be some consequence down the road. Does Spack not support moving external files to the Spack Environment that are included in the |
|
@adrienbernede personally im ok with merging but @white238 @cyrush thoughts? |
Co-authored-by: Alex Tyler Chapman <100869159+chapman39@users.noreply.github.com>
|
@becker33 thoughts? |
|
If you aren't using I'm able to reproduce it not working locally, but I'm not sure that I'll have time to debug it this week. |
|
Can you try applying this diff to Spack and see whether the change is still necessary? I have it still emiting a warning, a complete feature would avoid that but require a bit more engineering -- this should be enough to test whether it works for you and is worth moving forward. |
|
@becker33 I tried you suggested change. It turned a failure to find included files into a failure to find the compilers. Uberenv instructs Spack to create an environment at a This PR fixes that by replacing |
|
@adrienbernede when you use it with that change, what paths do you see in the created environment? The reason I'm asking is that Spack is supposed to be turning them into absolute paths, which would get rid of the need to copy them at all. But it doesn't appear to be happening properly in your case, and I'm trying to figure out why. |
|
@becker33 here is a reproducer with no uberenv involved: ## Radiuss Spack Configs
> git clone git@github.com:LLNL/radiuss-spack-configs.git
> git checkout woptim/config-updates
## Spack
> cd <path/to/spack>
> git checkout develop-2025-01-12
> . share/spack/setup-env.sh
## Let's go!
> spack env create -d ./spack_env <path/to/radiuss-spack-configs>/toss_4_x86_64_ib/spack.yaml
> cat <path/to/radiuss-spack-configs>/toss_4_x86_64_ib/spack.yaml
spack:
include:
- config.yaml
- compilers.yaml
- packages.yaml
concretizer:
reuse: false
unify: false
view: false
> cat spack_env/spack.yaml
spack:
include:
- config.yaml
- compilers.yaml
- packages.yaml
concretizer:
reuse: false
unify: false
view: falseI also tried using |
|
@adrienbernede can you try Spack with this patch and confirm it works for your use case? I intend to propose it to the rest of the Spack team once you confirm it works for you: |
|
@becker33 I confirm that tests passed with this change, causing the present PR to become obsolete. |
|
@becker33 Please let us know when the fix is pushed. I'll be happy to use the following snapshot release. |
|
Fix is here: spack/spack#48689 |
|
Should this PR be closed? |
|
@chapman39 I need for these branch to exist a little longer. |
|
I don't need the PR anymore, and pushed a tag for reference of the commit if necessary. |
Solves #137
This allows
spack.yamlfiles to include configuration files as long as they belong to the same directory or sub-directories.Note:
spack env createis not run anymore for existing spack.yaml file. Copy works fine in my tests, but there might be a side effect.