summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <gamblin2@llnl.gov>2022-11-29 16:17:13 -0800
committerGitHub <noreply@github.com>2022-11-29 16:17:13 -0800
commitc64c9649be1606d4f3e15abdca1f304e966ce80f (patch)
tree17cd03ab2253867b3440990eab6431af4f7ac6df
parent2c6b52f1370219edf2ff5ed1ffda9cd80e9cac54 (diff)
downloadspack-c64c9649be1606d4f3e15abdca1f304e966ce80f.tar.gz
spack-c64c9649be1606d4f3e15abdca1f304e966ce80f.tar.bz2
spack-c64c9649be1606d4f3e15abdca1f304e966ce80f.tar.xz
spack-c64c9649be1606d4f3e15abdca1f304e966ce80f.zip
debug: move "nonexistent config path" message to much higher verbosity level (#34201)
We currently report that searched config paths don't exist at debug level 1, which clutters the output quite a bit: ```console > spack -d solve --fresh --show asp hdf5 > hdf5.lp ==> [2022-11-29-14:18:21.035133] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/darwin/concretizer.yaml ==> [2022-11-29-14:18:21.035151] Skipping nonexistent config path /Users/gamblin2/.spack/concretizer.yaml ==> [2022-11-29-14:18:21.035169] Skipping nonexistent config path /Users/gamblin2/.spack/darwin/concretizer.yaml ==> [2022-11-29-14:18:21.035238] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/repos.yaml ==> [2022-11-29-14:18:21.035996] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/defaults/darwin/repos.yaml ==> [2022-11-29-14:18:21.036021] Skipping nonexistent config path /etc/spack/repos.yaml ==> [2022-11-29-14:18:21.036039] Skipping nonexistent config path /etc/spack/darwin/repos.yaml ==> [2022-11-29-14:18:21.036057] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/repos.yaml ==> [2022-11-29-14:18:21.036072] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/darwin/repos.yaml ==> [2022-11-29-14:18:21.036088] Skipping nonexistent config path /Users/gamblin2/.spack/repos.yaml ==> [2022-11-29-14:18:21.036105] Skipping nonexistent config path /Users/gamblin2/.spack/darwin/repos.yaml ==> [2022-11-29-14:18:21.071828] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/config.yaml ==> [2022-11-29-14:18:21.081628] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/defaults/darwin/config.yaml ==> [2022-11-29-14:18:21.081669] Skipping nonexistent config path /etc/spack/config.yaml ==> [2022-11-29-14:18:21.081692] Skipping nonexistent config path /etc/spack/darwin/config.yaml ==> [2022-11-29-14:18:21.081712] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/config.yaml ==> [2022-11-29-14:18:21.081731] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/darwin/config.yaml ==> [2022-11-29-14:18:21.081748] Skipping nonexistent config path /Users/gamblin2/.spack/config.yaml ==> [2022-11-29-14:18:21.081764] Skipping nonexistent config path /Users/gamblin2/.spack/darwin/config.yaml ==> [2022-11-29-14:18:21.134909] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/packages.yaml ==> [2022-11-29-14:18:21.148695] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/darwin/packages.yaml ==> [2022-11-29-14:18:21.152555] Skipping nonexistent config path /etc/spack/packages.yaml ==> [2022-11-29-14:18:21.152582] Skipping nonexistent config path /etc/spack/darwin/packages.yaml ==> [2022-11-29-14:18:21.152601] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/packages.yaml ==> [2022-11-29-14:18:21.152620] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/darwin/packages.yaml ==> [2022-11-29-14:18:21.152637] Skipping nonexistent config path /Users/gamblin2/.spack/packages.yaml ==> [2022-11-29-14:18:21.152654] Skipping nonexistent config path /Users/gamblin2/.spack/darwin/packages.yaml ==> [2022-11-29-14:18:21.853915] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/defaults/compilers.yaml ==> [2022-11-29-14:18:21.853962] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/defaults/darwin/compilers.yaml ==> [2022-11-29-14:18:21.853987] Skipping nonexistent config path /etc/spack/compilers.yaml ==> [2022-11-29-14:18:21.854007] Skipping nonexistent config path /etc/spack/darwin/compilers.yaml ==> [2022-11-29-14:18:21.854025] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/compilers.yaml ==> [2022-11-29-14:18:21.854043] Skipping nonexistent config path /Users/gamblin2/src/spack/etc/spack/darwin/compilers.yaml ==> [2022-11-29-14:18:21.854060] Skipping nonexistent config path /Users/gamblin2/.spack/compilers.yaml ==> [2022-11-29-14:18:21.854093] Reading config from file /Users/gamblin2/.spack/darwin/compilers.yaml ``` It is very rare that I want to know this much information about config search, so I've moved this to level 3. Now at level 1, we can see much more clearly what configs were actually found: ```console > spack -d solve --fresh --show asp hdf5 > hdf5.lp ==> [2022-11-29-14:19:04.035457] Imported solve from built-in commands ==> [2022-11-29-14:19:04.035818] Imported solve from built-in commands ==> [2022-11-29-14:19:04.037626] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/concretizer.yaml ==> [2022-11-29-14:19:04.040033] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/repos.yaml ==> [2022-11-29-14:19:04.080852] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/config.yaml ==> [2022-11-29-14:19:04.133241] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/packages.yaml ==> [2022-11-29-14:19:04.147175] Reading config from file /Users/gamblin2/src/spack/etc/spack/defaults/darwin/packages.yaml ==> [2022-11-29-14:19:05.157896] Reading config from file /Users/gamblin2/.spack/darwin/compilers.yaml ``` You can still get the old messages with `spack -ddd` (to activate debug level 3).
-rw-r--r--lib/spack/spack/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index c3165d1c9c..2ecb500390 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -737,7 +737,7 @@ def override(path_or_scope, value=None):
#: configuration scopes added on the command line
#: set by ``spack.main.main()``.
-command_line_scopes = [] # type: List[str]
+command_line_scopes: List[str] = []
def _add_platform_scope(cfg, scope_type, name, path):
@@ -989,7 +989,7 @@ def read_config_file(filename, schema=None):
if not os.path.exists(filename):
# Ignore nonexistent files.
- tty.debug("Skipping nonexistent config path {0}".format(filename))
+ tty.debug("Skipping nonexistent config path {0}".format(filename), level=3)
return None
elif not os.path.isfile(filename):