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

Fix incremental compiler not being able to find JDK classes when compiler macros with Java 11, close #502 #608

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

slandelle
Copy link
Collaborator

Motivation:

Jigsaw has changed the behavior of ClassLoaders.
For some reason, ScalaCompilerLoader with a null parent is able to find JDK classes on Java 8 but not on Java 11.

Modification:

Make the parent the root loader.

Result:

We can compile macros with Java 11.

slandelle added 2 commits June 2, 2022 02:16
…iler macros with Java 11, close #502

Motivation:

Jigsaw has changed the behavior of ClassLoaders.
For some reason, ScalaCompilerLoader with a null parent is able to find JDK classes on Java 8 but not on Java 11.

Modification:

Make the parent the root loader.

Result:

We can compile macros with Java 11.
@slandelle slandelle requested a review from davidB as a code owner June 2, 2022 00:18
@slandelle slandelle merged commit 9a52c47 into master Jun 2, 2022
@slandelle slandelle deleted the 502-macro-java11 branch June 2, 2022 17:30
HyukjinKwon pushed a commit to apache/spark that referenced this pull request Jun 8, 2022
### What changes were proposed in this pull request?
This pr aims upgrade scala-maven-plugin to 4.6.2

### Why are the changes needed?
This version brings some bug fix related to `Incremental compile`, although it seems that Spark has not encountered these issue:

- [Fix incremental compiler not being able to find JDK classes when compiler macros with Java 11, close #502](davidB/scala-maven-plugin#608)
- [Fix incremental compilation on Java 11+, close #600](davidB/scala-maven-plugin#609)

all changes as follows:

- davidB/scala-maven-plugin@4.6.1...4.6.2

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass Github Actions

Closes #36800 from LuciferYang/scala-maven-plugin-462.

Authored-by: yangjie01 <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant