From fc886276e571c91d7c874b0b3fed95e61b134c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Desgroppes?= Date: Mon, 30 Mar 2026 14:51:34 +0200 Subject: [PATCH] Stop ignoring `.bazelbsp` in REPO.bazel ### What does this PR do? Replace the alas too broad `.*` pattern in `ignore_directories` with more fine-grained patterns (`.c*`, `.d*`, `.g*`, `.i*`, `.v*`, `.*_cache`) that cover the same hidden directories while leaving `.bazelbsp` visible to `bazel`. ### Motivation IDE like IntelliJ IDEA and GoLand use the Bazel BSP (Build Server Protocol) integration, whose state lives in `.bazelbsp/`. The `".*"` catch-all caused Bazel to skip that directory, so these IDEs stopped refreshing the project. `ignore_directories` has no negation syntax, so enumerating more fine-grained patterns is the only available workaround. ### Describe how you validated your changes Verified that `.bazelbsp` no longer appears in the ignored set and that all previously-ignored hidden directories still match at least one of the new patterns. ### Additional Notes I'll file an issue upstream to request `ignore_directories` gets augmented with an `exclude=[]` arg like [glob](https://bazel.build/reference/be/functions#glob). --- REPO.bazel | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/REPO.bazel b/REPO.bazel index 78cdb523d40e..7d2f902f4c29 100644 --- a/REPO.bazel +++ b/REPO.bazel @@ -1,6 +1,12 @@ +# Do not ignore .bazelbsp: used by IDE BSP integration! ignore_directories([ "**/build", # avoid BUILD/build mess: https://github.com/docker/desktop-feedback/issues/251 - ".*", # hidden root directories: .cache, .claude, .cursor, .dda, .github, .gitlab, etc. + ".*_cache", # .mypy_cache, .pytest_cache, .ruff_cache + ".c*", # .cache, .claude, .cursor + ".d*", # .dda, .ddqa + ".g*", # .git, .github, .gitlab + ".i*", # .idea, .ijwb + ".v*", # .venv, .vscode "bazel-*", # bazel convenience symlinks: suddenly caused issues inside arm64 Linux containers "target", # cargo build creates it where Cargo.toml lives ])