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

Shared metadata service cannot be set to collect metadata gradle task in the starter-analytics-postgres module #2010

Open
msupic opened this issue Aug 15, 2023 · 0 comments
Assignees

Comments

@msupic
Copy link
Contributor

msupic commented Aug 15, 2023

Description

The GraalVMReachabilityMetadataService instance is created and set to the CollectReachabilityMetadata task in the first evaluated module (which is micronaut-cli) and then set to CollectReachabilityMetadata tasks created for other modules. But gradle execution fails to set the shared GraalVMReachabilityMetadataService instance in the starter-analytics-postgres because the GraalVMReachabilityMetadataService class from the starter-analytics-postgres module is loaded by different class loader. If the build.gradle.kts file is modified to build.gradle in the starter-analytics-postgres module, everything works ok, otherwise the following error is thrown:

Caused by: java.lang.IllegalArgumentException: Cannot set the value of task ':starter-analytics-postgres:collectReachabilityMetadata' property 'metadataService' of type org.graalvm.buildtools.gradle.internal.GraalVMReachabilityMetadataService using a provider of type org.graalvm.buildtools.gradle.internal.GraalVMReachabilityMetadataService.
        at org.gradle.api.internal.provider.AbstractMinimalProvider.asSupplier(AbstractMinimalProvider.java:154)
        at org.gradle.api.internal.provider.DefaultProperty.set(DefaultProperty.java:100)
        at org.graalvm.buildtools.gradle.NativeImagePlugin.lambda$configureJavaProject$11(NativeImagePlugin.java:298)

Steps to Reproduce

Execute ./gradlew tasks --no-daemon --all | grep -w "nativeTest" in the micronaut-starter

@msupic msupic changed the title Shared metadata service cannot be set to collect metadata gradle task in the starter-analytics-postgres module Shared metadata service cannot be set to collect metadata gradle task in the starter-analytics-postgres module Aug 15, 2023
@msupic msupic assigned msupic and melix and unassigned msupic Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants