Skip to content
New issue

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

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

Already on GitHub? # to your account

(Gradle) Running tests with agent fails with "Missing property userCodeFilterPath in agent conditional configuration" #554

Open
abelsromero opened this issue Dec 25, 2023 · 2 comments
Assignees
Labels
bug Something isn't working gradle-plugin Related to Gradle plugin

Comments

@abelsromero
Copy link
Contributor

Describe the bug
Running ./gradlew -Pagent nativeTest as per documentation in a project with no configuration (except adding the plugin), fails with

Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to calculate the value of property 'agentOptions'.
        at org.gradle.api.internal.provider.AbstractProperty.finalizeNow(AbstractProperty.java:248)
        at org.gradle.api.internal.provider.AbstractProperty.beforeRead(AbstractProperty.java:239)
        at org.gradle.api.internal.provider.AbstractProperty.calculateOwnValue(AbstractProperty.java:135)
        at org.gradle.api.internal.provider.AbstractMinimalProvider.getOrNull(AbstractMinimalProvider.java:105)
        at org.gradle.api.internal.provider.ProviderResolutionStrategy$1.resolve(ProviderResolutionStrategy.java:27)
        at org.gradle.util.internal.DeferredUtil.unpack(DeferredUtil.java:59)
        at org.gradle.util.internal.DeferredUtil.unpackOrNull(DeferredUtil.java:49)
        at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:38)
        at org.gradle.api.internal.tasks.properties.InputParameterUtils.prepareInputParameterValue(InputParameterUtils.java:30)
        ... 72 more
Caused by: org.gradle.api.GradleException: Missing property userCodeFilterPath in agent conditional configuration
        at org.graalvm.buildtools.gradle.internal.agent.AgentConfigurationFactory.lambda$getAgentConfiguration$653f1fdd$1(AgentConfigurationFactory.java:81)
        at org.gradle.api.internal.provider.ValueSupplier$Present.transform(ValueSupplier.java:541)
        at org.gradle.api.internal.provider.TransformBackedProvider.mapValue(TransformBackedProvider.java:91)
        at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(TransformBackedProvider.java:83)

env:

Make sure that you have read the documentation and that you are using the latest plugin version.

To Reproduce

git clone -b add-native-java-compatibility git@github.com:abelsromero/java-parallels.git
cd java-parallels
./gradlew -Pagent nativeTest

Expected behavior
It should run tests and provide auto-generated metadata 🙏

Logs

System Info (please complete the following information):

  • OS: MacOs
  • GraalVM Version: 21.0.1 CE
  • Java Version: 21
  • Plugin version: 'org.graalvm.buildtools.native' version '0.9.28'

Additional context

@abelsromero abelsromero added the bug Something isn't working label Dec 25, 2023
@abelsromero
Copy link
Contributor Author

Looking at the code, it seems the issue is that it's setting the "conditional" mode by default. Forcing the standard works ./gradlew -Pagent=standard nativeTest.
But base on other docs, it seems standard should be the default.

@dnestoro dnestoro added the gradle-plugin Related to Gradle plugin label Jul 15, 2024
@sdelamo
Copy link

sdelamo commented Sep 11, 2024

I hit this issue today as well. @abelsromero workaround of using -Pagent=standard worked

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working gradle-plugin Related to Gradle plugin
Projects
None yet
Development

No branches or pull requests

4 participants