Add .bazelignore for .claude#18
Merged
Merged
Conversation
bazel query //... and bazel build //... traverse into every directory that looks like a Bazel package. The .claude/ directory holds Claude Code agent worktrees (full wohl checkouts with their own BUILD.bazel files) and local settings — none of which should be evaluated by the root workspace. Without .bazelignore, an agent worktree under .claude/worktrees/agent-*/ makes bazel try to load that worktree's BUILD files as packages of the root workspace, and the load fails (e.g. missing transitive rules from sibling checkouts the agent had). .bazelignore with `.claude` tells bazel to skip the directory entirely, which is both correct (.claude is tooling state, not a build input) and unblocks future "bazel build //..." CI jobs (tracked in #8). Verified: bazel query '//...' now enumerates targets cleanly with agent worktrees still present under .claude/worktrees/. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
.bazelignoreat the repo root containing.claude. Closes the first item in #14.Why
bazel query //...andbazel build //...traverse every directory that looks like a Bazel package. The.claude/tree holds Claude Code agent worktrees (each a full wohl checkout with its ownBUILD.bazel) and local settings — none of which belong in the root workspace's build graph. Without.bazelignore, an agent worktree under.claude/worktrees/agent-*/makes bazel try to load that worktree's BUILD files as packages of the root workspace, and the load fails on missing transitive rules from sibling checkouts the agent had (e.g. earlier in the project: anrules_rocq_rustreference inside a worktree's relay symlink brokebazel query //...).This wasn't just hypothetical — it's been a real blocker for trying to wire
bazel build //...into CI (#8).Verification
bazel query '//...'now enumerates targets cleanly with agent worktrees still present under.claude/worktrees/. No other changes.🤖 Generated with Claude Code