[build] document Bazel worktree output-base cleanup#17689
Conversation
PR Summary by QodoDocument Bazel output-base cleanup for git worktrees Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
11 rules 1.
|
|
Code review by qodo was updated up to the latest commit a9b4d83 |
|
This would be better in the |
|
I like the idea, but I don't think we want to force this on everyone all the time. The output-base leak is specific to temporary worktrees on Mac/Linux. It would break things for Windows, and using a relative path can cause weird behaviors unless you always run bazel from top level directory. |
|
Code review by qodo was updated up to the latest commit 95c82b3 |
🔗 Related Issues
💥 What does this PR do?
Documents that Bazel creates a per-checkout output base that, unlike the shared
--disk_cache/--repository_cache, is never garbage-collected when a worktree is deleted. Inworktree-heavy workflows these orphaned output bases accumulate and leak gigabytes. The README
"Using Worktrees" section and AGENTS.md "Agent workspace" now explain how to make a worktree
self-cleaning by pointing its output base inside the worktree (
startup --output_base=.local/bazel-out),with a Windows caveat preserving the existing
--output_user_rootguidance.🔧 Implementation Notes
🤖 AI assistance
💡 Additional Considerations
🔄 Types of changes