Or more precisely, the old tree persists even when the target is built with --enable_runfiles=false. This causes observable semantic differences when the artifact is sensitive to how the runfiles tree is laid out (or whether it exists at all).
Minimal repro:
# pkg/BUILD
cc_binary(
name = "blah",
srcs = ["blah.cc"],
)
// pkg/blah.cc
#include <stdio.h>
int main(int argc, char** argv) {
printf("Hello, world!\n");
return 0;
}
$ bazel clean
...
$ bazel run //pkg:blah
...
$ ls bazel-bin/pkg/blah.runfiles
__main__ MANIFEST
$ bazel run //pkg:blah --enable_runfiles=false
...
$ ls bazel-bin/pkg/blah.runfiles
__main__ MANIFEST
$ bazel clean
...
$ bazel run //pkg:blah --enable_runfiles=false
...
$ ls bazel-bin/pkg/blah.runfiles
MANIFEST
Or more precisely, the old tree persists even when the target is built with
--enable_runfiles=false. This causes observable semantic differences when the artifact is sensitive to how the runfiles tree is laid out (or whether it exists at all).Minimal repro: