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

Locale dependent buildjar code #1342

Closed
hkwi opened this issue Jun 7, 2016 · 4 comments
Closed

Locale dependent buildjar code #1342

hkwi opened this issue Jun 7, 2016 · 4 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug
Milestone

Comments

@hkwi
Copy link

hkwi commented Jun 7, 2016

hasRecognizedError in (bazel/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/ReducedClasspathJavaLibraryBuilder.java ) parses command line output messages, which varies by system language setting. So build failed on my computer with Japanese locale. I could successfully built the binary from scratch when I changed the system language to English on Windows 10, which requires log off and log on.

Possible fix are:

  • add something like "-J-Duser.language=en" to javac arguments, or
  • inject arguments like this, or
  • change the system locale on every bazel build
@meteorcloudy meteorcloudy added type: bug P2 We'll consider working on this in future. (Assignee optional) labels Jun 7, 2016
@meteorcloudy
Copy link
Member

/cc @damienmg How can we fix this properly?

@damienmg
Copy link
Contributor

damienmg commented Jun 7, 2016

/cc @eaftan @cushon maintain buildjar so they might know

@ulfjack ulfjack added this to the 1.0 milestone Jun 16, 2016
@ulfjack
Copy link
Contributor

ulfjack commented Jun 16, 2016

We could disable the reduced classpath. Or you could do that as a workaround.

I think this is the right flag:
--experimental_java_classpath=off

@ulfjack ulfjack added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed P2 We'll consider working on this in future. (Assignee optional) labels Jun 16, 2016
@cushon
Copy link
Contributor

cushon commented Jun 16, 2016

Yep, --experimental_java_classpath=off should work around it.

It would be nice to avoid hard-coding a locale. We might be able to have the reduced classpath compilation emit structured diagnostics, and then do the locale-dependent formatting after checking if fallback was needed.

luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    Fixes bazelbuild/bazel#1342

    --
    PiperOrigin-RevId: 145144856
    MOS_MIGRATED_REVID=145144856
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) type: bug
Projects
None yet
Development

No branches or pull requests

5 participants