feat: surface compiler warnings from every build path
VoidBuildSystem CI / 1 · Requirements (push) Successful in 4s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m11s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m47s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 3m54s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m30s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 7m34s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 17s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 18s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m38s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Successful in 5m44s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Successful in 5m16s
VoidBuildSystem CI / 4B · Windows package (debug) (push) Successful in 20s
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Successful in 38s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Successful in 41s
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Successful in 40s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Successful in 50s
VoidBuildSystem CI / 5 · Release (push) Skipped
VoidBuildSystem CI / 1 · Requirements (push) Successful in 4s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m11s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m47s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 3m54s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m30s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 7m34s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 17s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 18s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m38s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Successful in 5m44s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Successful in 5m16s
VoidBuildSystem CI / 4B · Windows package (debug) (push) Successful in 20s
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Successful in 38s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Successful in 41s
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Successful in 40s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Successful in 50s
VoidBuildSystem CI / 5 · Release (push) Skipped
Factor the warning output into print_action_warnings and use it for the build/test loop and vbs install; the daemon build logs the stderr of successful actions as well.
This commit is contained in:
1 parent
ca8770812e
commit
c8eb950ca0
2 files changed
+18
-10
No files matched your search
+15
-10
@@ -81,6 +81,19 @@ namespace {
|
||||
|
||||
using namespace Void::Build;
|
||||
|
||||
// Prints the compiler warnings/notes captured from actions that succeeded.
|
||||
// Only failures used to print their stderr, hiding warnings entirely.
|
||||
void print_action_warnings(const Execution::ExecutionReport &report) {
|
||||
for (const auto &result : report.results) {
|
||||
if (result.succeeded && !result.from_cache && !result.stderr_data.empty()) {
|
||||
std::cerr << result.stderr_data;
|
||||
if (result.stderr_data.back() != '\n') {
|
||||
std::cerr << '\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ANSI colors are enabled only for a terminal and are disabled by NO_COLOR or --no-color.
|
||||
bool g_no_color = false;
|
||||
|
||||
@@ -789,16 +802,7 @@ int execute_build_or_test(BuildCmdOptions opts, bool run_tests) {
|
||||
all_ok = false;
|
||||
continue;
|
||||
}
|
||||
// Surface compiler warnings and notes from actions that succeeded: only
|
||||
// failures used to print their captured stderr, hiding warnings entirely.
|
||||
for (const auto &ar : rep->results) {
|
||||
if (ar.succeeded && !ar.from_cache && !ar.stderr_data.empty()) {
|
||||
std::cerr << ar.stderr_data;
|
||||
if (ar.stderr_data.back() != '\n') {
|
||||
std::cerr << '\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
print_action_warnings(*rep);
|
||||
Void::Log::info("Build", "[{}] Finished in {:.2f}s ({} executed, {} cached)", prof_name,
|
||||
prof_sw.elapsed_ms() / 1000.0, rep->executed_count, rep->cached_count);
|
||||
std::cout << "vbs: [" << prof_name << "] built (" << rep->executed_count << " executed, "
|
||||
@@ -2679,6 +2683,7 @@ int execute_install_command(const InstallCmdOptions &opts) {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
print_action_warnings(*exec);
|
||||
Void::Log::info("Install", "Staging and installing package '{}' ({}) to '{}'...",
|
||||
iopts.package_name, iopts.package_version, iopts.prefix.string());
|
||||
auto inst = Install::install_project(*desc, *graph, iopts);
|
||||
|
||||
Reference in new issue
Block a user