Skip to content

Commit

Permalink
AVRO-3666: Debug ARM build
Browse files Browse the repository at this point in the history
Fix the compile error by disabling the cache for the Hadoop2 build.
This cannot be code related, as the other test builds succeed.
  • Loading branch information
opwvhk committed Nov 15, 2023
1 parent e9c33b3 commit d74a925
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-lang-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ jobs:
java -version
mvn -version
#MAVEN_OPTS="-Dsurefire.excludes=*TestCustomCodec*,*TestAllCodecs*,*TestNettyServer*" ./build.sh clean test
./build.sh clean test
./build.sh clean test
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
<extension>
<groupId>org.apache.maven.extensions</groupId>
<artifactId>maven-build-cache-extension</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
</extension>
</extensions>
3 changes: 2 additions & 1 deletion lang/java/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# limitations under the License.

set -e
set -x

usage() {
echo "Usage: $0 {lint|test|dist|clean}"
Expand All @@ -33,7 +34,7 @@ main() {
test)
mvn -B test
# Test the modules that depend on hadoop using Hadoop 2
mvn -B test -Phadoop2
mvn -Dmaven.build.cache.enabled=false -B test -Phadoop2
;;
dist)
mvn -P dist package -DskipTests javadoc:aggregate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import org.apache.avro.idl.IdlReader;

import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.nio.file.Files;
import java.util.List;

/**
Expand Down Expand Up @@ -56,8 +56,9 @@ public int run(InputStream in, PrintStream out, PrintStream err, List<String> ar
File outputFile = "-".equals(outputName) ? null : new File(outputName);

Schema m = null;
Protocol p = null;
Protocol p;
if (useJavaCC) {
// noinspection deprecation
try (Idl parser = new Idl(inputFile)) {
p = parser.CompilationUnit();
for (String warning : parser.getWarningsAfterParsing()) {
Expand All @@ -77,7 +78,7 @@ public int run(InputStream in, PrintStream out, PrintStream err, List<String> ar

PrintStream parseOut = out;
if (outputFile != null) {
parseOut = new PrintStream(new FileOutputStream(outputFile));
parseOut = new PrintStream(Files.newOutputStream(outputFile.toPath()));
}

if (m == null && p == null) {
Expand Down

0 comments on commit d74a925

Please sign in to comment.