-
Notifications
You must be signed in to change notification settings - Fork 163
[#1982] fix(build): specify maven.compiler.release while JDK version greater than 8 #1983
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
Conversation
Test Results 2 747 files ±0 2 747 suites ±0 5h 48m 4s ⏱️ + 9m 11s Results for commit 6f5c6c9. ± Comparison against base commit 7c4be40. This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
A concern. Will it influence the performance of the code? |
I'm not sure, I'm not familiar with this part. cc @EnricoMi @zuston @advancedxy @rickyma @kaijchen |
|
Maybe it's better to add mvn options in here https://github.com/apache/incubator-gluten/pull/6484/files#diff-38eda6989d285e6a3d79a3a66cc656d0b6d483b3d5c77bd0969d878642fd0f0eL512 |
|
I don't think you should update the mvnw script. You should update the pom.xml in this repo or like @summaryzb suggested, compile uniffle with corresponding mvn options in gluten. |
|
Please refer this: https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html
Can you elaborate a bit on the use case? |
Currently, if users use the jar we published to the Maven repository, they must not use JDK8, otherwise they need to compile rss-client-spark3-shaded.jar themselves as Gluten ci does. |
I'm not sure. I believe the published jar on maven is and should be compiled by JDK 1.8 when releasing. So they can be used under JDK 1.8? |
Right. |
So why gluten need to compile uniffle themself if they are using JDK 1.8? Or there's other cases? |
I think I misread this. The 0.9.0 version of the jar currently released to the Maven repository is not compiled using JDK8, so gluten need to compile uniffle themself if they are using JDK 1.8. |
|
I see, I did a check on the released jar of uniffle, it's indeed not compiled with JDK 1.8. I think we should fix that and maybe release a patch version of 0.9.1 to address this issue. However, I don't think the fix should be made on the mvnw script, which is essentially just a wrapper file around mvn and should be rarely updated. Would you mind updating your code to use the conditional configuration in https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html instead? |
OK for me. @jerqi WDYT |
|
@jerqi do you have any comments about this? I think we should address this issue and release 0.9.1 quickly. |
Ok for me, too. |
|
BTW, this should be put into 0.9.1, too. |
+1, You can commit it to branch 0.9 directly. |
Done. |
| <jdk>[9,)</jdk> | ||
| </activation> | ||
| <properties> | ||
| <maven.compiler.release>8</maven.compiler.release> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if users want to build Uniffle with higher JDK and release with higher jdk versions?
Is it possible for them to run mvn with something like below?
./mvnw -Dmaven.compiler.release=11
If so, you should update the README.md about the Building Uniffle section as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, I tested this PR locally, it works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
advancedxy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one minor comment. LGTM otherwise.
|
@zuston it seems the rust test is flaky, could you take a look at that when you have time: https://github.com/apache/incubator-uniffle/pull/1983/checks?check_run_id=28495024345 @xianjingfeng please re-trigger the failed CI. |
|
Since there's no objections raised so for, I will merge this. @xianjingfeng would you mind to send a PR to branch-0.9 to include this fix too? |
ok |
…greater than 8 (#1983) ### What changes were proposed in this pull request? Set maven.compiler.release to 8 by default when compiling with higher JDK versions ### Why are the changes needed? Fix: #1982 ### Does this PR introduce _any_ user-facing change? Yes, kind of. Uniffle client built by higher JDK versions can would directly on JDK 1.8 ### How was this patch tested? Compile with JDK11 and examine the byte code using `javap`. (cherry picked from commit cd61112)
…rsion greater than 8 (apache#1983) ### What changes were proposed in this pull request? Set maven.compiler.release to 8 by default when compiling with higher JDK versions ### Why are the changes needed? Fix: apache#1982 ### Does this PR introduce _any_ user-facing change? Yes, kind of. Uniffle client built by higher JDK versions can would directly on JDK 1.8 ### How was this patch tested? Compile with JDK11 and examine the byte code using `javap`. (cherry picked from commit cd61112)
What changes were proposed in this pull request?
Specify maven.compiler.release while JDK version greater than 8.
Why are the changes needed?
Fix: #1982
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Compile with JDK11 and examine the bytecode using javap.