[libcxx] Use debug() instead of note() for substitutions#193667
Conversation
Created using spr 1.3.7 [skip ci]
Created using spr 1.3.7
|
@llvm/pr-subscribers-libcxx Author: Vitaly Buka (vitalybuka) ChangesThis reduces the noise in the lit output when running tests like this: Can be re-enabled runtime with LIT_OPTS=-debug Full diff: https://github.com/llvm/llvm-project/pull/193667.diff 1 Files Affected:
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index c1bba1167d9a3..cfc7d2c3cd7d4 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -52,7 +52,7 @@ def configure(parameters, features, config, lit_config):
# Print the basic substitutions
for sub in ("%{cxx}", "%{flags}", "%{compile_flags}", "%{link_flags}", "%{benchmark_flags}", "%{exec}"):
- note("Using {} substitution: '{}'".format(sub, _getSubstitution(sub, config.substitutions)))
+ debug("Using {} substitution: '{}'".format(sub, _getSubstitution(sub, config.substitutions)))
# Print all available features
- note("All available features: {}".format(", ".join(sorted(config.available_features))))
+ debug("All available features: {}".format(", ".join(sorted(config.available_features))))
|
You can test this locally with the following command:darker --check --diff -r origin/main...HEAD libcxx/utils/libcxx/test/config.py
View the diff from darker here.--- config.py 2026-04-23 19:44:41.000000 +0000
+++ config.py 2026-04-23 19:45:45.979564 +0000
@@ -49,10 +49,21 @@
action.pretty(config, lit_config.params), feature.pretty(config)
)
)
# Print the basic substitutions
- for sub in ("%{cxx}", "%{flags}", "%{compile_flags}", "%{link_flags}", "%{benchmark_flags}", "%{exec}"):
- debug("Using {} substitution: '{}'".format(sub, _getSubstitution(sub, config.substitutions)))
+ for sub in (
+ "%{cxx}",
+ "%{flags}",
+ "%{compile_flags}",
+ "%{link_flags}",
+ "%{benchmark_flags}",
+ "%{exec}",
+ ):
+ debug(
+ "Using {} substitution: '{}'".format(
+ sub, _getSubstitution(sub, config.substitutions)
+ )
+ )
# Print all available features
note("All available features: {}".format(", ".join(sorted(config.available_features))))
|
Created using spr 1.3.7 [skip ci]
Created using spr 1.3.7 [skip ci]
philnik777
left a comment
There was a problem hiding this comment.
I don't mind putting the expansions in debug, but I'd really like to keep the available features. I use that too often to figure out what exactly is going on to abandon that into a relatively obscure flag.
Some people do check-all, with manyLLVM projects |
It's one line of output. That's not exactly significant amounts of noise. Even if every subproject did that it'd be like 20 lines at most. It didn't bother anybody for at least the last five years, while I probably used that output hundreds of times for debugging at this point. |
on the HEAD now: Hopefully we can avoid some unnecessary rebuilds steps, but limit 'build noise' |
|
|
Although this isn't a strict blocker, the daily visual noise is quite distracting—arguably more so than the occasional sub-optionally formatted file. I would really appreciate it if this change could be accepted. As an added bonus, it should help us save on input tokens! :) |
with CMAKE_INSTALL_MESSAGE=NEVER for incremental builds as it's rather 60% (on the HEAD for my setup)
But then it's not perfect (talking about "Running all regression tests" step) :) |
|
extracted featueres into #193827 in case you'd like to reconsider latter |
Why do you care so much that there is no output at all? I care that I get the information I need on a regular basis, which this patch would remove. I looked at that literally today. That would make it significantly worse to debug problems in the lit configuration with very limited benefit that I can see. |
philnik777
left a comment
There was a problem hiding this comment.
With the title and description updated I'm fine with not printing the substitutions by default.
This reduces the noise in the lit output when running tests like this:
Note: "All available features" is still preserved.
Can be re-enabled runtime with LIT_OPTS=-debug