--workspace_status_command: handling of empty values is surprising and inconsistent #16037
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
stale
Issues or PRs that are stale (no activity for 30 days)
team-Loading-API
BUILD file and macro processing: labels, package(), visibility, glob
type: bug
Description of the bug:
If the workspace status command prints a line containing a key and a trailing space, this line will be copied to
volatile-status.txt
(orstable-statux.txt
). This is OK.If the workspace status command prints a line containing a key only, this line gets discarded. This is somewhat surprising and undocumented.
If the workspace status command prints a line containing a key without value as the last line of the output, this line gets discarded, even if there is a a trailing space after the key. This is surprising, undocumented and inconsistent with example #1.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Summary
My workspace status command:
My
bazel-out/volatile-status.txt
:Details
Same problem on release 4.2.2.
Which operating system are you running Bazel on?
RHEL 7.9
What is the output of
bazel info release
?5.2.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?
I haven't found anything relevant, sorry, except the documentation (https://bazel.build/docs/user-manual#workspace-status):
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: