From b5256d4bd5aa24f8bad57d18b09ed8d104be351e Mon Sep 17 00:00:00 2001 From: Knut Wannheden Date: Thu, 10 Sep 2026 09:06:50 +0200 Subject: [PATCH 1/2] build: pin file.encoding so the Maven build generates the parser on Windows JJTree reads the .jjt under GRAMMAR_ENCODING but writes the intermediate .jj with the JVM default charset. On a platform whose default is a legacy code page the grammar's Unicode character classes are written lossily, and JavaCC then rejects the mangled ranges: Error: Line 2331, Column 294: Right end of character range '?' has a lower ordinal value than the left end of character range '?'. The Gradle build has pinned -Dfile.encoding=UTF-8 in gradle.properties since 2021, which is why only the Maven build is affected. Give it the same pin via .mvn/jvm.config and put windows-latest back in the maven_verify matrix. --- .github/workflows/ci.yml | 3 +-- .mvn/jvm.config | 1 + pom.xml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .mvn/jvm.config diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f2fa19db..a36189576 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,8 +64,7 @@ jobs: strategy: fail-fast: false matrix: - # windows-latest disabled: see # — record the reason, not just the comment - os: [ ubuntu-latest, macos-latest ] + os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - uses: actions/checkout@v5 with: diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 000000000..7fecadb38 --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1 @@ +-Dfile.encoding=UTF-8 diff --git a/pom.xml b/pom.xml index 212e1fe8f..f73fea0f9 100644 --- a/pom.xml +++ b/pom.xml @@ -426,6 +426,11 @@ jjtree-javacc + -CODE_GENERATOR:"Java" From 8c65dabab3733179ab2ff2ddb228d5490d47a3fa Mon Sep 17 00:00:00 2001 From: Knut Wannheden Date: Thu, 10 Sep 2026 09:19:42 +0200 Subject: [PATCH 2/2] build: pin file.encoding for the forked test JVMs as well ParserKeywordsUtilsTest regenerates the .jj in-process and reads it back, so it depends on the default charset the same way the build does. Surefire forks its test JVMs and those do not inherit .mvn/jvm.config, leaving them on the platform default: ParserKeywordsUtilsTest.getAllKeywordsUsingJavaCC ... <<< ERROR! org.javacc.parser.MetaParseException Gradle needs no equivalent: its test workers take their encoding from the daemon, which gradle.properties already pins. --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index f73fea0f9..1f28ee1d2 100644 --- a/pom.xml +++ b/pom.xml @@ -569,11 +569,13 @@ @{jacocoArgLine} is resolved late, after jacoco:prepare-agent has run. Without it the JaCoCo agent would be dropped and coverage reports empty. --> + @{jacocoArgLine} --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED -Xmx2G -Xms800m -Xss4m + -Dfile.encoding=UTF-8