Text Block syntax unsupported by turbine, making valid java 15 syntax fail bazel build #15083
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Rules-Java
Issues for Java rules
Description of the problem / feature
The java Text Block was landed as JEP 378 in Java 15. Unfortunately, it seems all recent versions of bazel fails to accept the text block syntax when the turbine header compiler is used.
Looking at the main branch of the turbine lexer, it is clear that it does not have support for Text Blocks and will fail parsing any input java file containing the new syntax.
A workaround for now is to add the
--nojava_header_compilation
command line option.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Any bazel build invocation which invokes the turbine header compiler on a file that contains a JEP 378 style text block will illustrate the problem. For example if a
java_binary
target depends on ajava_library
target which has a text block in one of it's source files. I created https://github.com/nresare/bazel-multiline-problem as a minimal test project.Expected outcome: successful build
Actual outcome:
What operating system are you running Bazel on?
MacOS 12.3, MacBook Air M1
What's the output of
bazel info release
?release 5.0.0
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.This problem is also visible when building from lastest master, I tried just now with 00d74ff
What's the output of
git remote get-url origin ; git rev-parse main ; git rev-parse HEAD
?Have you found anything relevant by searching the web?
I did a casual search among the issues, but failed to find this reported previously.
The text was updated successfully, but these errors were encountered: