Skip to content
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

Compiling from IntelliJ can cause UnsupportedClassVersionError using the preprocessor and using pre-JDK 17 #418

Closed
rsmckinney opened this issue Jan 25, 2023 · 1 comment

Comments

@rsmckinney
Copy link
Member

Compiling from IntelliJ can cause UnsupportedClassVersionError using the preprocessor and using pre-JDK 17.

The problem appears to be that IntelliJ sets JPS thread pool thread context class loader, which is the thread the compiler executes in. This loader is full of IntelliJ jars including plugin jars, all compiled with JDK 17. None of these jars should be visible to the ServiceLoader when used from the compiler, including from compiler plugins like manifold, annotation processors, etc. If a call is made to ServiceLoader#hasNext() in this situation and the compiler is older than JDK 17, it will blow up with UnsupportedClassVersionError. But really, none of these service impls should be loaded anyway since they are specific to IntelliJ and not the compiling project.

rsmckinney added a commit that referenced this issue Jan 25, 2023
- work around the IntelliJ ServiceLoader issue
@rsmckinney
Copy link
Member Author

Fixed with release 2022.1.38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant