You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Re-enable -Werror in the routes-compiler-routes-compilation-java scripted test #14367
Unlike routes-compiler-routes-compilation, the Java routes fixture routes-compiler-routes-compilation-java doesn't fail on compiler warnings. -Xfatal-warnings was removed in 9105fca (#13004), the same commit that added the 26-parameter /multi-params route. Since then the build only adds -Xlint and similar options on Scala 2. Besides the Scala fixture, routes-compiler-exhaustive-warning, routes-compiler-namespace-reverse-router and routes-compiler-no-package-declaration-in-routes-file also compile with -Werror.
The app and test code of the Java fixture is Java, so scalac only compiles the generated routes code there. Turning fatal warnings back on would check that code for the route shapes that only this fixture has, e.g. ?= null defaults, PATCH/HEAD/OPTIONS routes, or a route with 26 parameters.
Right now two kinds of warnings would make it fail. Both appear in the scripted test logs of #13231 (CI run 38574225740), where the fixture is compiled without -Werror:
Scala 3.9 and Scala 3.next, $ in identifiers: 8 warnings, all from the non-ASCII route controllers.πø$7ß.ôü65$t (conf/routes and app/controllers/πø$7ß.java):
[warn] -- [E230] Syntax Warning: .../routes/main/controllers/ReverseRoutes.scala:726:8
[warn] 726 | class Reverseπø$7ß(_prefix: => String) {
[warn] | ^^^^^^^^^^^^
[warn] |The identifier `Reverseπø$7ß` should not contain `$`, which is reserved for internal compiler use.
daaee03 already renamed this to πø7ß.ôü65t in the other fixtures for exactly this warning; the Java fixture was left out.
Scala 3.3.8 compiles the fixture without warnings. The Scala 3.next job in the same run used 3.10.0-RC3 and emitted the same eight $ identifier warnings as Scala 3.9.0 (CI job).
Activity