Commit fb21d42
committed
Make
### What does this PR do?
Configure the `//:gazelle` target with `-build_file_name=BUILD.bazel`.
### Motivation
When `gazelle` runs inside a Linux container on macOS via Docker
Desktop, the workspace is typically mounted on a case-insensitive
filesystem where `BUILD` and `build` are indistinguishable.
This causes spurious errors such as:
```sh
bazel run //:gazelle; echo $?
...
gazelle: open /dda/.gitlab/windows/build: no such file or directory
open /dda/rtloader/build: no such file or directory
1
```
Whereas the cause strictly resides in a filesystem layer/driver
(docker/desktop-feedback#251, recently imported from docker/for-mac#7218),
portable tools have been taking countermeasures. Bazel 9, for instance,
revamped their filesystem cache to better accomodate case-insensitive
filesystems (bazelbuild/bazel#26842), which led us to switch to it
(#47742), but that only covers Bazel's own I/O, not the processes it
spawns, of which `gazelle`.
For that purpose, Gazelle happens to explicitly recommend setting
its `build_file_name` directive to `BUILD.bazel`:
> If a repository contains files named `build` that aren't related to Bazel, it may help to set this to `"BUILD.bazel"`, especially on case-insensitive file systems.
### Additional Notes
For consistency with the narrowed scope, this change renames
`compliance/rules/BUILD` to `compliance/rules/BUILD.bazel` (the only
plain `BUILD` file still present in the tree).gazelle consider only BUILD.bazel files1 parent 93f1578 commit fb21d42
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| |||
File renamed without changes.
0 commit comments