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

build: Upgrade spotless version to 2.43.0 #85

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

viirya
Copy link
Member

@viirya viirya commented Feb 22, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

Current spotless 2.29.0 doesn't work with Apache Maven 3.9.6 + Java version: 21.0.2.

java.lang.reflect.InvocationTargetException
   at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:118)
  at java.lang.reflect.Method.invoke (Method.java:580)
...
Caused by: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()'
...

What changes are included in this PR?

How are these changes tested?

@viirya
Copy link
Member Author

viirya commented Feb 22, 2024

Hmm, it's not compatible with Java 8.

@@ -38,9 +38,17 @@ runs:
shell: bash
run: |
echo "JAVA_VERSION=${JAVA_VERSION}"
./mvnw -B compile test-compile scalafix:scalafix -Psemanticdb -Djava.version=${JAVA_VERSION}
if [ $JAVA_VERSION == "1.8" ]; then
./mvnw -B compile test-compile scalafix:scalafix -Psemanticdb -Djava.version=${JAVA_VERSION} -Dspotless.version=2.29.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it OK to use 2.29.0 for Java 8?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line uses 2.29.0 for Java 8, isn't?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean whether we'll run into the issue mentioned in the PR description if we use 2.29 for Java 8

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is no.

This issue is particular for Java 21: diffplug/spotless#1791

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh cool.

@viirya viirya merged commit 074b5fd into apache:main Feb 22, 2024
14 checks passed
@viirya
Copy link
Member Author

viirya commented Feb 22, 2024

Merged. Thanks.

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.

2 participants