Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building a project with Java record types fails with error: unexpected identifier 'record' #13924

Closed
neilg opened this issue Aug 30, 2021 · 2 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules

Comments

@neilg
Copy link

neilg commented Aug 30, 2021

Description of the problem / feature request:

Building a project with Java record types fails with error: unexpected identifier 'record' if a target depends on the target with record types. That is, if consumer depends on records then the build fails, however, if the dependency is removed then the build succeeds.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

A project demonstrating the build failure is available: https://github.com/neilg/bazel-records
The main branch fails to build, the working branch builds.

What operating system are you running Bazel on?

Linux pinot 5.13.13-arch1-1 #1 SMP PREEMPT Thu, 26 Aug 2021 19:14:36 +0000 x86_64 GNU/Linux

What's the output of bazel info release?

release 5.0.0-pre.20210824.2

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

n/a

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

n/a

Have you found anything relevant by searching the web?

Nothing in any of these places.

Any other information, logs, or outputs that you want to share?

No

@eikemeier
Copy link

As a workaround, you can use build --nojava_header_compilation, see https://github.com/melsicon/value-comparison

@aiuto aiuto added team-Rules-Java Issues for Java rules untriaged labels Sep 5, 2021
@comius
Copy link
Contributor

comius commented Sep 10, 2021

cc @cushon, ijar will probably need to support new constructs in newer Java versions

@comius comius added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Sep 10, 2021
@cushon cushon self-assigned this Sep 20, 2021
@cushon cushon closed this as completed Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-Java Issues for Java rules
Projects
None yet
Development

No branches or pull requests

5 participants