Skip to content

Conversation

graalvmbot
Copy link
Collaborator

@graalvmbot graalvmbot commented Sep 12, 2025

Warnings during image builds can easily be overlooked. This PR counts all warnings and prints a summary again at the end of the build.

Sample output of mx helloworld with 2 warnings during the build.

...
                        1.5s (4.8% of total time) in 66 GCs | Peak RSS: 1.89GB | CPU load: 11.35
------------------------------------------------------------------------------------------------------------------------
Build artifacts:
 /home/christian/oracle/graalvm/graal/substratevm/svmbuild/helloworld (executable)
========================================================================================================================
Finished generating 'helloworld' in 31.0s.

Finished generating 'test' in 20.4s.

The build process encountered 2 warnings.

Hello from native-image!

and optionally, when the -Werror flag is set:

Error: Build failed: Warnings are treated as errors because the -Werror flag is set.
Command '/home/christian/oracle/graalvm/graal/sdk/mxbuild/linux-amd64/GRAALVM_415521A54B_JAVA26/graalvm-415521a54b-java26-26.0.0-dev/bin/native-image -Werror Test -Dllvm.bin.dir=/home/christian/oracle/graalvm/graal/sdk/mxbuild/linux-amd64/LLVM_TOOLCHAIN/bin/' returned non-zero exit status 1.

(outdated screenshot)
warnings_list.jpg

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 12, 2025
@graalvmbot graalvmbot merged commit cd08f59 into master Sep 12, 2025
13 checks passed
@graalvmbot graalvmbot deleted the chw/GR-43070/logging_warnings branch September 12, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants