Do not initialize config on spack compiler list#28042
Do not initialize config on spack compiler list#28042tgamblin merged 6 commits intospack:developfrom
Conversation
|
Thanks @haampie! I don't know if this already fixes the following, but I noticed that doing |
|
@msimberg I personally agree with
|
Thanks @alalazo for giving a bit of context. I wanted to open #28038 since I really wasn't sure if it was intended behaviour or not. It was surprising behaviour to me, since it definitely was not "the first time" I ran spack. The context was that I was planning to change to a new system-provided config file, and first wanted to check that I didn't have any leftover compilers defined elsewhere before I changed to the new config. Arguably "the first time it is run" can have quite a few different definitions and does not need to be equivalent to "running I'm obviously personally happy with this PR, but I don't have any demands that this is the right fix and lack the bigger picture. |
tgamblin
left a comment
There was a problem hiding this comment.
I think this is a good idea -- for 0.18.0 (though we'll hopefully be adding compilers as dependencies for that so this might change quite a bit before the release).
The docs don't actually seem to have anything that says spack compiler list should find compilers -- I grepped around and couldn't find it. They do have some sort of ambiguous mentions of spack compilers in configuration.rst and getting_started.rst.
Two requests:
- Update
configuration.rstandgetting_started.rst. - If
spack compiler list/spack compilersfinds no compilers, it should prompt the user to runspack compiler find(if it's run from atty). Can you add that?
ecf58cf to
4ba8e32
Compare
|
With the last commits: |
|
@tgamblin I'm not sure what docs sections you were referring to in configuration.rst |
|
bump @tgamblin |
1 similar comment
|
bump @tgamblin |
When `spack compiler list` is run without being restricted to a particular scope, and no compilers are found, prompt to search for compilers.
289568e to
1d7356d
Compare
|
Okay, the interactive prompt is gone again, it's just showing nothing now when stdout is not a tty: $ SPACK_USER_CONFIG_PATH=$PWD spack compiler list
==> No compilers available. Run `spack compiler find` to autodetect compilers
$ SPACK_USER_CONFIG_PATH=$PWD spack compiler list --scope=system
==> No compilers available
$ SPACK_USER_CONFIG_PATH=$PWD spack compiler list | tee
$ echo $?
0and there's a test that otherwise fails on develop. |
1d7356d to
cea654b
Compare
When `spack compiler list` is run without being restricted to a particular scope, and no compilers are found, say that none are available, and hint that the use should run spack compiler find to auto detect compilers. * Improve docs * Check if stdin is a tty * add a test
When `spack compiler list` is run without being restricted to a particular scope, and no compilers are found, say that none are available, and hint that the use should run spack compiler find to auto detect compilers. * Improve docs * Check if stdin is a tty * add a test
When `spack compiler list` is run without being restricted to a particular scope, and no compilers are found, say that none are available, and hint that the use should run spack compiler find to auto detect compilers. * Improve docs * Check if stdin is a tty * add a test
spack compiler listshould show the current config and not write new compilers to config.