bazel icon indicating copy to clipboard operation
bazel copied to clipboard

bazelrc line with missing command should fail fast instead of silently ignoring

Open alexeagle opened this issue 2 years ago • 6 comments

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 is

startup --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 returns development 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

alexeagle avatar Apr 13 '22 16:04 alexeagle