hpi-swa / trufflesqueak

A Squeak/Smalltalk VM and Polyglot Programming Environment for the GraalVM.
MIT License
283 stars 14 forks source link

The type jdk.internal.module.Modules is not accessible - error when compiling #171

Closed psvensson closed 2 years ago

psvensson commented 2 years ago

I've configured Eclipse (latest) with openjdk 17 on Linux Min 20.2 and everything seems OK except that I get an error in ReflectionUtils.java ----> /de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/util

When searching, I see that this problem was fond and fixed in 2019 (for GraalVM); https://bugs.openjdk.org/browse/JDK-8230680 But wouldn't that mean that things should work now? Or is there some extra magic I need to add to make it work?

fniephaus commented 2 years ago

This is the first time I am seeing this error. For development, you certainly need a LabsJDK for your platform. You can get one via mx fetch-jdk. Also, I'm mostly building with mx build (or mx --env trufflesqueak-jvm build) using a LabsJDK 11. Moreover, there is mx eclipseinit, which creates Eclipse project files for you that you can import. Everything else is not really supported.

psvensson commented 2 years ago

I did actually just use a standard JDK in the beginning, but then started again with an mx-installed proper jdk, but in the end I wound up with the exact same error/problem.

However, I was able to build using just ../mx/mx build, so that did work (I also set JAVA_HOME tot he mx-installed jdk beforehand).

I will try to use the CLI way of working then, but I think it would be good if you revisited using Eclipse to see if the problem can be replicated.

fniephaus commented 2 years ago

Maybe join the GraalVM Slack, there's a dedicated #mx channel for this sort of questions. There's also lots of other options such as exploded builds and I know that can use Eclipse's incremental building together with mx somehow, I'm just not doing it to be honest.

psvensson commented 2 years ago

Yes, you're right. This is more a thing for GraallVM specifically of course. But since this project is dependent on that, it might be a good idea anyhow to revisit if the recommended ways of developing do work, just in case someone else drops by and tries to follow the same instructions.

Having said that I should add that the instructions are very good and work very well, and I will as said, try to use the same way as you do to continue. All good.