-
Notifications
You must be signed in to change notification settings - Fork 93
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
Expose org.graalvm.sdk:graal-sdk dependency as compileOnlyApi #352
Expose org.graalvm.sdk:graal-sdk dependency as compileOnlyApi #352
Conversation
This saves having to add it to every Grails 7 application
That dependency is not required. I am running a Grails 7 app and Asset Pipeline 5.0.1 and do not need it. |
This is only needed for compile time or development runtime. We wanted to explicitly exclude it from getting injected into the war/jar because its not required for production war builds. |
Without this dependency added to the grails 7 test apps:
the following has occurred across a number of test applications:
|
@codeconsole's Grails 7 application doesn't need this dependency because he removed.
And has it defined in one location in build.gradle:
Example where it was required: https://github.com/jamesfredley/grails-website-test We had planned to go that direction for |
so this issue is purely related to the gradle side? |
you do need it in grails run-app or dev but not in the final jar or war. need a way to inject this dependency but NOT package it in the war/jar |
We have a similar, probably related, issue using spring boot . A possible workaround is adding graalvm to
Using |
With jdk 17 this solution above worked, but in my case I am using jdk 11 which is not compatible. org/graalvm/polyglot/Value has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 |
This will end up being a somewhat frequent occurrence for those upgrading to Grails 7, that had been loading remove
also remove it from then define in
|
@davydotcom Do you have a suggestion on how to make this available only during development? I'm assuming this is a gradle plugin change for grails? |
Updated PR to use https://docs.gradle.org/current/userguide/java_library_plugin.html |
I am not sure if I don't recommend any change if it is only for people who are loading the plugin incorrectly. if it works in a |
Correct, the issue only arises during development runtime with our Spring Boot applications. As expected, the change to To have this working again as before commit fce79e6, the following asset-pipeline-core implementation 'org.graalvm.sdk:graal-sdk:22.0.0.2'
implementation 'org.graalvm.js:js:22.0.0.2' |
More details are captured on grails/grails-core#13913 including the workaround we used for a number of Grails projects and on start.grails.org for Grails 6.2.2 and 7.0.0-SNAPSHOT. grails/grails-core#13913 (comment) includes more details on the root issue, although all details of the root cause have not been tracked down. |
@av-m @jamesfredley is this a windows only or a jdk 17 issue? why do I not get this exception in development mode without these dependencies with jdk 21 on osx? |
It also happens with JDK 11. |
This saves having to add it to every Grails 7 application