This is a regression, as 4.11.1 works correctly.
For files with a package starting in u, for instance it.unibo.xxx, when used under Windows, ANTLR 4.12.0 produces a header comment in the form:
// Generated from it\unibo\alchemist\model\internal\biochemistry\dsl\Biochemistrydsl.g4 by ANTLR 4.12.0
This is problematic, however, as the Java compiler reports it as error: illegal unicode escape
Here is a gradle scan showing the issue:
https://scans.gradle.com/s/uxdeejknwdmve/console-log?task=:alchemist-incarnation-biochemistry:compileJava
Quick reproduction can be achieved with the following:
git clone https://github.com/AlchemistSimulator/Alchemist.git
cd Alchemist
git checkout renovate/antlr4
./gradlew :alchemist-incarnation-biochemistry:compileJava
The fix should be reasonably easy; I'd suggest converting backslashes to slashes in the header (also, this would generate the same comment code for all the platforms).
This is a regression, as 4.11.1 works correctly.
For files with a package starting in
u, for instanceit.unibo.xxx, when used under Windows, ANTLR 4.12.0 produces a header comment in the form:This is problematic, however, as the Java compiler reports it as
error: illegal unicode escapeHere is a gradle scan showing the issue:
https://scans.gradle.com/s/uxdeejknwdmve/console-log?task=:alchemist-incarnation-biochemistry:compileJava
Quick reproduction can be achieved with the following:
The fix should be reasonably easy; I'd suggest converting backslashes to slashes in the header (also, this would generate the same comment code for all the platforms).