Closed xamde closed 1 year ago
Thanks for this - can you add an integration test with the sample class that demonstrates the issue, and reduce the logging to DEBUG (as users generally won't need to see this)?
There's a good chance that this isn't going to be the long-term fix for this, but it will depend on how good j2cl's error messages are for members/classes that don't exist, but I think this will be good for now.
In general I am a bit concerned about this complexity - we might need to test some caching a little more in depth to be sure that changing the JVM doesn't produce unusable code or something. With that said, this entire branch should go away if #150 pans out, since we won't use javac at all to produce gwtincompatible-stripped bytecode for j2cl any more.
If #150 does work out, we will still have these integration tests to ensure that we don't lose this functionality, even if we do end up tossing the code.
Explicitly setting the PLATFORM_CLASSPATH seems key for proper shading of native JRE with emulate JRE classes. However, this shading is not desired, when compiling dependencies. So a switch was needed, depending on who calls Javac.
Fixes #140