Comments (7)
When dealing with the polyglot.engine.resourcePath
(unversioned resources), the code should avoid reaching that point and attempting to unpack any resources. The fix checks for this scenario. Unversioned resources have their path
field set. Utilizing the polyglot.engine.resourcePath
alone won't be effective unless an unversioned resource cache is precreated using the Engine#copyResources
method. This method constructs a resources folder containing all necessary resources, which must be added to your Docker image. Subsequently, you can direct the polyglot.engine.resourcePath
to this designated folder.
I believe that using the XDG_CACHE_HOME
environment variable might be simpler for your use case.
from graal.
I tried to disable the cache on the sources. It doesn't help, the Engine loads the cache anyways.
from graal.
@tzezula do you have a suggestion for a workaround? Whatever it is an assertion should not be reachable.
from graal.
I can't currently find a way to work around this. I can't change user.home for the app, I can't get write access, and I can't circumvent the test pipelines. Overriding the path in the current form doesn't work. There doesn't seem to be any flag to disable the cache completely.
I don't have further suggestions as I don't understand what "VERSIONED" does or allows. I would remove user.home
or do whatever is necessary to have the overridden path create VERSIONED
paths.
from graal.
The polyglot.engine.resourcePath
system property needs to be used with an lready pre-created unversioned resources created by the Engine.html#copyResources method. It's not direct replacement for the versioned resources cache in the user.home
. On Linux we support XDG_CACHE_HOME
environemt variable that can be used to override the default cache folder ~/.cache
for versioned resources.
The assertion error has been resolved in the commit 74bbd92 within GraalVM 24.0.0. I will backport this fix into GraalVM 23.1.3. Failing on assertion errors is not desirable. In GraalVM 24.0.0, the failure is now on a more reasonable error Can't load library: /Users/tom/Downloads/01/engine/libtruffleattach/bin/libtruffleattach.dylib.
will also enhance the Embedders Guide to provide a more detailed description of the polyglot.engine.resourcePath
system property.
from graal.
The
polyglot.engine.resourcePath
system property needs to be used with an lready pre-created unversioned resources created by the Engine.html#copyResources method. It's not direct replacement for the versioned resources cache in theuser.home
.
This sounds like the current implementation is an unintended side-effect. Just from the diff I can't grasp how this solves the conflict of using polyglot.engine.resourcePath
breaking the cache(test). I will wait and see. I will have the environment varaible checked
from graal.
I've introduced the polyglot.engine.userResourceCache
system property, enabling users to customize the default versioned resources cache folder. This property serves as a cross-platform alternative to the XDG_CACHE_HOME
environment variable.
d85c8c9
from graal.
Related Issues (20)
- Using native-image and Android apk files. HOT 3
- [GR-54193] Improve docs on JSON config files HOT 1
- What would be your recommendation to native compile a simple Java library and then call this native compiled library from another Java program? HOT 19
- native-image build error in graal-22.0.1
- jdk.VirtualThreadPinned JFR event NOT supported in native-image HOT 2
- jdk.graal.compiler.debug.GraalError: should not reach here: kind=V256_QWORD input=xmm6|V256_QWORD result=xmm0|V256_QWORD HOT 1
- epsilon and G1 seem not to work with JFR in NI HOT 2
- JFR CPU profiler does not respect the configured sampling period HOT 3
- Error encountered while parsing com.sun.glass.ui.mac.MacVariant.toString (MacVariant.java:193) HOT 2
- problem running compiled file when I have @Qualifier annotation in my code HOT 1
- native-image swing program in linux cannot switch to Chinese IME in the JTextField component HOT 2
- GraalVM website reference manual guide looks broken HOT 4
- absolute relocations in rodata section HOT 1
- Native images throw `MissingResourceRegistrationError` despite the resource being actually registered (but not present) HOT 1
- Crash with Kotlin Coroutines / Kotlin 2.0 HOT 2
- com.github.kevinsawicki dependency error HOT 2
- Missleading warning after the integration of proxy registration to the reflection config HOT 1
- Running gradlew nativeCompile in Spring Boot application fail because a missing OkHttp3 configuration for datadog HOT 1
- GraalVM compiler reports java.lang.NoSuchMethodError: java.lang.StringCoding.countPositives([BII) HOT 1
- native-image and poi: Defining hidden classes at runtime is not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graal.