spack/lib
Harmen Stoppels 13739e0783
environments: don't replace relative view path with absolute path on concretize/install (#34958)
* environments: don't rewrite relative view path, expand path on cli ahead of time

Currently if you have a spack.yaml that specifies a view by relative
path, Spack expands it to an absolute path on `spack -e . install` and
persists that to disk.

This is rather annoying when you have a `spack.yaml` file inside a git
repo, cause you want to use relative paths to make it relocatable, but
you constantly have to undo the changes made to spack.yaml by Spack.

So, as an alternative:

1. Always stick to paths as they are provided in spack.yaml, never
   replace them with a canonicalized version
2. Turn relative paths on the command line into absolute paths before
   storing to spack.yaml. This way you can do `spack env create --dir
   ./env --with-view ./view` and both `./env` and `./view` are resolved
   to the current working dir, as expected (not `./env/view`). This
   corresponds to the old behavior of `spack env create`.

* create --with-view always takes a value
2023-01-23 10:03:54 -08:00
..
spack environments: don't replace relative view path with absolute path on concretize/install (#34958) 2023-01-23 10:03:54 -08:00