Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review Gradle and Maven output for warnings #602

Open
1 of 5 tasks
binkley opened this issue Jul 31, 2024 · 3 comments
Open
1 of 5 tasks

Review Gradle and Maven output for warnings #602

binkley opened this issue Jul 31, 2024 · 3 comments
Labels
hygiene Anything to keep ${subject} current and clean

Comments

@binkley
Copy link
Owner

binkley commented Jul 31, 2024

This project generates WARNING messages in the build from various tools.
Some or many cases may be easily resolved, and as-is are "noise" in the build. Noise makes it harder for devs to see true problems.

Tasks

  • Evaluate these, and see can be resolved sensibly. Attach to this card (see comments below)
  • Resolve Gradle warnings that are straight-forward
  • Resolve Maven warnings that are straight-forward
  • Document what fixes and workarounds cleaned up output in straight-forward cases
  • Document what is not easily resolved. Update the wiki pages to give insight for others
@binkley binkley added the hygiene Anything to keep ${subject} current and clean label Jul 31, 2024
@binkley binkley changed the title Scan Gradle and Maven output for warnings Review Gradle and Maven output for warnings Jul 31, 2024
@binkley
Copy link
Owner Author

binkley commented Jul 31, 2024

Contrast the Gradle and Maven outputs for warnings.
warnings-maven.txt
warnings-gradle.txt

This warning from the Gradle plugin is potentially problematic:

timestamp PIT >> INFO : MINION : WARNING: Dynamic loading of agents will be disallowed by default in a future release

And implies this project picks up that update. This may depend on JDK version in use.

@binkley
Copy link
Owner Author

binkley commented Jul 31, 2024

Evaluating warning output from Gradle:

OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

I don't feel this project should configure to make the JVM quieter. This warning is from plugins that use runtime configuration such as injecting an agent. PIT is the largest culprit in these warnings.

timestamp PIT >> INFO : MINION : WARNING: A Java agent has been loaded dynamically (/home/binkley/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.14.15/b4cc9d88d5de562bf75b3a54ab436ad01b3f72d/byte-buddy-agent-1.14.15.jar)

This is the kind of agent injection mentioned above.

timestamp PIT >> INFO : MINION : WARNING: If a serviceability tool is in use, please run with XX:+EnableDynamicAgentLoading to hide this warning

TODO: Decide if we should add this JVM flag. It will suppress warnings like this, but also make it harder to spot security issues.

timestamp PIT >> INFO : MINION : WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information

Another warning from plugins using agents.

timestamp PIT >> INFO : MINION : WARNING: Dynamic loading of agents will be disallowed by default in a future release

Another warning from plugins using agents.

timestamp PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to > https://docs.gradle.org/8.9/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

These seems to be generic warnings from Gradle as the PIT plugin needs an agent to modify bytecode.

@binkley
Copy link
Owner Author

binkley commented Jul 31, 2024

Evaluating warning output from Maven:

WARNING: A Java agent has been loaded dynamically (/home/binkley/.m2/repository/net/bytebuddy/byte-buddy-agent/1.14.15/byte-buddy-agent-1.14.15.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

These seem to be related to bytecode manipulation tools. It is interesting that Gradle and Maven produce different warnings.

[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] Unable to locate Source XRef to link to - DISABLED

This is as Maven pom.xml is setup to process Javadoc, and Gradle build.gradle is not.
These are bad links in Javadoc and implies class paths or source paths in the Maven build need tweaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hygiene Anything to keep ${subject} current and clean
Projects
Status: No status
Development

No branches or pull requests

1 participant