-
Notifications
You must be signed in to change notification settings - Fork 37
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
Split JVM syscall implemetations into separate modules, add FFM #200
Conversation
84eb06b
to
44fa835
Compare
Hm, looks like the graal test isn't running on nativeimage, it's just the regular JVM. The only GHA change was to go from JDK 21 -> 22, so not sure why that would have broken... |
It doesn't say much in the logs, but maybe it is because we're missing some I use those ones I haven't made a PR, as I'm not sure if we can pass every flag for every platform. If it's the case, we could add them to the native-image.properties. If not, I guess we could implement org.graalvm.nativeimage.hosted.Feature |
Ok, so It had nothing to do with that (even if the flags are still required) The output when running locally is
Since the test runs two times, we can do something like this #186 (comment) But then I have another weird error
I might do a PR tomorrow |
Thanks for looking into it! I implemented your suggestions, and ended up with the same error. The only lead I have right now is that the |
I made a PR that should hopefully solve those issues #201 |
8a79b21
to
0d1968e
Compare
Before the new native image default `--strict-image-heap`, we used `--initialize-at-build-time=com.github.ajalt.mordant.internal.MppImplKt` so that the os was resolved at build time and classes of other OS were not used. With the new default, we need to specify every class that needs to be initialized from the initialized class. It's also easy to move or introduce a new class and not keep the configuration synced. We now use @substitute + @platforms to get the expected behaviour Substituting TerminalInterfaceProviderJna isn't really needed, but it prevents the jna classes from being included in the final binary. As for the Ffm provider, we need to disable it as it requires a build flag `-H:+ForeignAPISupport` + some configuration and isn't supported with GraalVM 21.
When compiling a native image, we get the following error: > java.lang.IncompatibleClassChangeError: com.github.ajalt.mordant.terminal.terminalinterface.WinKernel32Lib and com.github.ajalt.mordant.terminal.terminalinterface.WinKernel32Lib$EventUnion disagree on InnerClasses attribute There were multiple classes with the same package + name
We get the following warning when compile the native image: -H:ResourceConfigurationResources': Use a resource-config.json in your META-INF/native-image/<groupID>/<artifactID> directory instead. Since they are already in the right place, we can simply remove the native-image.properties
No description provided.