Skip to content

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

Open
coderabbit-test/bazel
#19
@alexeagle

Description

@alexeagle

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)team-CoreSkyframe, bazel query, BEP, options parsing, bazelrctype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions