Skip to content

Commit

Permalink
build: Upgrade spotless version to 2.43.0 (#85)
Browse files Browse the repository at this point in the history
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()'
...
```
  • Loading branch information
viirya authored Feb 22, 2024
1 parent b6a1407 commit 074b5fd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/actions/java-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
else
./mvnw -B compile test-compile scalafix:scalafix -Psemanticdb -Djava.version=${JAVA_VERSION}
fi
- name: Run tests
shell: bash
run: |
SPARK_HOME=`pwd` ./mvnw -B clean install -Djava.version=${JAVA_VERSION}
if [ $JAVA_VERSION == "1.8" ]; then
SPARK_HOME=`pwd` ./mvnw -B clean install -Djava.version=${JAVA_VERSION} -Dspotless.version=2.29.0
else
SPARK_HOME=`pwd` ./mvnw -B clean install -Djava.version=${JAVA_VERSION}
fi
6 changes: 5 additions & 1 deletion .github/actions/rust-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ runs:
shell: bash
run: |
cd common
../mvnw -B clean compile -DskipTests -Djava.version=${JAVA_VERSION}
if [ $JAVA_VERSION == "1.8" ]; then
../mvnw -B clean compile -DskipTests -Djava.version=${JAVA_VERSION} -Dspotless.version=2.29.0
else
../mvnw -B clean compile -DskipTests -Djava.version=${JAVA_VERSION}
fi
- name: Run Cargo test
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ under the License.
<parquet.maven.scope>provided</parquet.maven.scope>
<arrow.version>14.0.2</arrow.version>
<codehaus.jackson.version>1.9.13</codehaus.jackson.version>
<spotless.version>2.29.0</spotless.version>
<spotless.version>2.43.0</spotless.version>
<jni.dir>${project.basedir}/../core/target/debug</jni.dir>
<platform>darwin</platform>
<arch>x86_64</arch>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public final class CometShuffleMemoryAllocator extends MemoryConsumer {

/** The number of bits used to address the page table. */
private static final int PAGE_NUMBER_BITS = 13;

/** The number of entries in the page table. */
private static final int PAGE_TABLE_SIZE = 1 << PAGE_NUMBER_BITS;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public class CometUnsafeShuffleWriter<K, V> extends ShuffleWriter<K, V> {
private long peakMemoryUsedBytes = 0;
private ExposedByteArrayOutputStream serBuffer;
private SerializationStream serOutputStream;

/**
* Are we in the process of stopping? Because map tasks can call stop() with success = true and
* then call stop() with success = false if they get an exception, we want to make sure we don't
Expand Down

0 comments on commit 074b5fd

Please sign in to comment.