Conversation
|
The time to talk about this was #26735, which we merged yesterday. Will accept bug fixes for SPACK_DISABLE_LOCAL_CONFIG if it’s not working properly. |
|
Really?! I've issued concerns in that PR
Both @alalazo and @tjfulle agreed to that
So it seems this is entirely your decision, and you've not listened. The thing I pointed out there was almost identical to the issue described in this PR, it's just that nobody had thought of it, because it was very much rushed. |
|
Also @mathstuf raised a concern
which is legitimate, and is item 2 mentioned in this PR. |
|
FWIW, I don't like the
With the above, compilers, cache, and bootstrap are written to the directory of their choice. If they want to have a cache and bootstrap shared between different |
|
Ok reopening for discussion. I want there to be one single way for the user to disable configuration from the host machine. That's the point of Because you have to:
Disabling the config scopes altogether is much simpler -- there's no location to set; the user doesn't have to think about it or come up with anything.
|
Both of these are local to the host machine. |
|
FWIW, I have made progress without the |
|
@tgamblin - thanks for the clarification on the meaning of the local config variable. That makes more sense. But, can spack ever realistically disable a local config? I don't think so. By local config I mean a local directory containing config files, cache, and bootstrapping data, etc. As far as I can tell, Spack needs to be able to read/write these. I see nothing wrong with dropping all that in The system config path should not be configurable. It should be in |
CI machines on platforms without containers need to ensure that global state like this is not touched in a writable manner, so disabling it is important (I've added symlinks from
Distros and package managers would love to make this Though the utility of ports or HomeBrew shipping Spack is admittedly weird :) . |
|
@mathstuf - I agree. So spack should honor you're right, The system path may change depending on the conventions for the system. My point is users should not tell spack where the system path is, that's weird. They should be able to opt out of it. |
|
Well, the thing is I still need user configuration (the compiler detection needs written somewhere after all), so just being able to redirect it to be under the CI root is sufficient (as long as everything actually behaves). |
FWIW, there is no de facto standard for Linux -- or at least there is not just one.
If we are talking about standards, XDG actually does break out a separate You can see the issue in your comment here:
If you do this, you're not actually done, because if Basically:
So it makes sense to me to allow the user to do one very simple thing to guarantee an isolated env -- set Once all that is done you should not actually NEED to set anything but |
|
Ok I have tried to resolve this in #27022. Please take a look. |
|
My 2c on this is that I like having Not having a cache-side version is slightly unfortunate, but I don't see how removing it helps us. |
|
I'm gonna close this, dropping either |
$user_config_pathas a variable, which is used inbootstrap.yaml, meaning that, although config from~/.spackis not read, it still is potentially referred and written to in places.SPACK_DISABLE_LOCAL_CONFIG, the first writable config scope for spack is$spack/etc/spack, it's only a matter of time until people start opening issues about that.Another one-liner solution is to use
$user_cache_pathin bootstrap.yaml's defaults, but this goes counter to the original goal of being able to reuse the same bootstrap store across multiple spack versions (or rather: package repos) using a different misc cache folder. So we should probably not pursue that.After this PR, ci scripts would have to use:
Before this PR, they would have to do:
so it's not an inconvenience.
In the end it's important we don't solve this problem through even more ad-hoc solutions, but rather we should reduce the complexity introduced in #26735, of which I wasn't a fan from the start... Any new feature that's introduced is something we'd have to live with in 0.17, and that was exactly the reason my original version of #26735 was very minimal.