Commit cb7cdee
authored
build: pin file.encoding so the Maven build works on Windows (#2565)
* 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.
* 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.1 parent 6c726d8 commit cb7cdee
3 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
429 | 434 | | |
430 | 435 | | |
431 | 436 | | |
| |||
564 | 569 | | |
565 | 570 | | |
566 | 571 | | |
| 572 | + | |
567 | 573 | | |
568 | 574 | | |
569 | 575 | | |
570 | 576 | | |
571 | 577 | | |
| 578 | + | |
572 | 579 | | |
573 | 580 | | |
574 | 581 | | |
| |||
0 commit comments