-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
bazelrc line with missing command should fail fast instead of silently ignoring #15245
Comments
Not familiar with the code off-hand, but it's possible the rc file has parsers in both Java and C++ (in order for the client to interpret startup flags). |
This is the same as internal issue See my comment 6 there (Dec 2022) for an internal-only thing we'd need to do if we want to do a good job addressing this issue. |
Hi, I just got bitten by this one, and it hurts pretty bad given I knew I added the flags, I just missed that damn "build" in front of them. I see there are some internal blockers. Anything we can do to help move it forward, or work around internal code inside open Bazel ? What is the status of this internal issue ? For reference: https://bazelbuild.slack.com/archives/CA31HN1T3/p1704752021290139 |
There's some Google-internal code that separately implements the One way to help move this GitHub issue forward would be to mail a PR that fixes the bug. That would spur someone to review it (and then have to do the additional work mentioned above). |
So, I have #20895 addressing this issue. It is a bit bold, but anything more involved requires the client to know the list of valid commands, which introduces redundancy. I would love to get feedback from people involved here. |
For reference here are some more edge cases I found:
|
Description of the bug:
It's very easy to forget the command in a bazelrc file, for example this mistake in
https://github.com/aspect-build/rules_js/pull/34/files
--host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
simply has no effect because it's missing a command before the flags appear on that line, the correct way isstartup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1
This silent failure is confusing to users, and a source of bugs. I've seen many cases at clients where lines in the bazelrc are being silently ignored.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
No response
What is the output of
bazel info release
?No response
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?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: