Writing to standard out from a java annotation processor produces incomprehensible error message #17448
Labels
P1
I'll work on this now. (Assignee required)
team-Local-Exec
Issues and PRs for the Execution (Local) team
type: bug
Description of the bug:
I was trying to reproduce a bug in a minimal test case, and in the process wanted to write things to standard out in an annotation processor. Doing so however makes bazel fail, and not in a way that makes it obvious to a user what is wrong.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
MyAnnotation.java:
MyProcessor.java:
SomeClass.java:
BUILD.bazel:
Executing
bazel build :some_class
results in the following output:Replacing
System.out
withSystem.err
inMyProcessor.java
makes everything work fine (though the output doesn't show up).Which operating system are you running Bazel on?
Ubuntu 22.04.1 LTS
What is the output of
bazel info release
?release 6.0.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
Possibly #11948 is related (same issue?) It's the issue that made me think writing to standard out might be the problem.
Any other information, logs, or outputs that you want to share?
I've seen on a few invocations the processor output (
Hello from process()!
) ends up in the error message instead of(emtpy)
, though it's been rare.The text was updated successfully, but these errors were encountered: