Skip to content

Avoid disabled agent instrumentation#905

Open
jormundur00 wants to merge 2 commits into
graalvm:masterfrom
jormundur00:fix-disabled-agent-instrumentation
Open

Avoid disabled agent instrumentation#905
jormundur00 wants to merge 2 commits into
graalvm:masterfrom
jormundur00:fix-disabled-agent-instrumentation

Conversation

@jormundur00

Copy link
Copy Markdown
Member

Fixes #847.
Fixes #743.

Summary

  • skip native-image agent task wiring when the resolved agent mode is disabled
  • keep agent output tracking for actual agent runs
  • add a functional regression test for repeated Gradle run and IntelliJ-style JavaExec executions without -Pagent

Testing

  • JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:functionalTest --tests 'org.graalvm.buildtools.gradle.JavaApplicationFunctionalTest.does not make JavaExec tasks up-to-date when the agent is disabled'\n- JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal GRAALVM_HOME=/home/jovan/.sdkman/candidates/java/25.0.2-graal ./gradlew :native-gradle-plugin:functionalTest --tests 'org.graalvm.buildtools.gradle.JavaApplicationWithAgentFunctionalTest.agent instruments run task'\n- JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal GRAALVM_HOME=/home/jovan/.sdkman/candidates/java/25.0.2-graal ./gradlew :native-gradle-plugin:functionalTest --tests 'org.graalvm.buildtools.gradle.JavaApplicationWithAgentFunctionalTest.supports configuration cache'\n- JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:checkstyleMain

@jormundur00 jormundur00 added the bug Something isn't working label Jun 2, 2026
@jormundur00 jormundur00 self-assigned this Jun 2, 2026
@jormundur00 jormundur00 requested a review from vjovanov June 2, 2026 12:29
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 2, 2026
@jormundur00 jormundur00 force-pushed the fix-disabled-agent-instrumentation branch from 9c4c05d to a6b1c12 Compare June 5, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

org.graalvm.buildtools.native plugin breaks java application run in IntelliJ IDEA Applying the Gradle plugin causes the run task to be UP-TO-DATE

1 participant