Skip to content

--experimental_output_directory_naming_scheme=diff_against_baseline caused Bazel to rebuild whenever --run_under or --test_env change #18480

@linzhp

Description

@linzhp

Description of the bug:

When --experimental_output_directory_naming_scheme=diff_against_baseline, running --run_under echo or --test_env FOO=bar would invalidate the cache and rebuild everything. Bazel wouldn't rebuild if --experimental_output_directory_naming_scheme=diff_against_baseline is not given.

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

git clone git@github.com:bazelbuild/bazel-gazelle.git
cd bazel-gazelle
# populate the cache
bazel build --experimental_output_directory_naming_scheme=diff_against_baseline //cmd/gazelle
# This would rebuild everything.
bazel run --run_under echo --experimental_output_directory_naming_scheme=diff_against_baseline //cmd/gazelle
# This also rebuilds everything
bazel build --test_env FOO=bar --experimental_output_directory_naming_scheme=diff_against_baseline //cmd/gazelle

Which operating system are you running Bazel on?

macOS and Linux

What is the output of bazel info release?

release 6.2.0-homebrew

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

Labels

P2We'll consider working on this in future. (Assignee optional)more data neededteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionstype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions