powsybl / pypowsybl

A PowSyBl and Python integration based on GraalVM native image
Mozilla Public License 2.0
55 stars 12 forks source link

[WIP] GraalVM JDK 21 #669

Open geofjamg opened 11 months ago

geofjamg commented 11 months ago

Please check if the PR fulfills these requirements

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

JDK version update

What is the current behavior?

In order to use '--pgo-instrument -H:+ProfilingEnableProfileDumpHooks' to instrument for PGO a shared library we need to upgrade to JDK 21. This is not supported with JDK 17. But there is an issue in JDK 21 that does not allow to use native image with the class path https://github.com/oracle/graal/issues/7712. So we need to wait for a fix or a workaround. Another issue that have to be solved for upgrading to JDK21: https://github.com/oracle/graal/issues/7759

24/08/04 Still same error with JDK22

Error: Expected Object but got Word for call argument in com.powsybl.python.network.NetworkCFunctions.setWorkingVariant(NetworkCFunctions.java:376). One possible cause for this error is when word values are passed into lambdas as parameters or from variables in an enclosing scope, which is not supported, but can be solved by instead using explicit classes (including anonymous classes).

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change or deprecate an API?

Other information: