chore(deps): setup aspect-gazelle for BUILD file generation#6195
Merged
Conversation
Add aspect-gazelle as a prebuilt binary via rules_multitool to automatically generate and maintain BUILD.bazel files for JS/TS packages. Includes lefthook pre-commit integration to keep BUILD files in sync on every commit. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add aspect-gazelle as a prebuilt binary via rules_multitool. All language extensions are disabled by default (JS disabled via directive, others via ENABLE_LANGUAGES env). Includes lefthook pre-commit integration. Gazelle is scaffolded and ready to be enabled per-package as needed. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove bzl_library rules that were accidentally left by the starlark gazelle extension in tools/, intl-datetimeformat, and intl-segmenter. These referenced @bazel_skylib which is not a direct dependency. Add knowledge-base/gazelle-migration.md documenting the plan to decompose custom macros into stock rules gazelle can manage. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2 tasks
longlho
added a commit
that referenced
this pull request
Mar 30, 2026
## Summary Revert the BUILD file changes from the gazelle migration (phases 1-3) while keeping the scaffolding and documentation. ### Reverted - Phase 1: `ts_binary` → `js_binary` inlining (#6197) - Phase 2: `ts_compile` macro decomposition (#6198) - Phase 3+4: `vitest` decomposition + gazelle JS enablement (#6199) ### Kept - Gazelle scaffolding: aspect-gazelle setup, multitool, lefthook integration (#6195) - Knowledge-base documentation (#6196) ### Why The `map_kind` + `copy_to_bin` approach caused conflicting actions — both `copy_to_bin(name = "srcs")` and gazelle's direct file lists produce the same output files through `ts_project`. A different approach is needed that either eliminates `copy_to_bin` or uses a custom gazelle extension. ## Test plan - [x] 495 tests pass - [ ] CI passes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
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
rules_multitool— scaffolding only, all generation disabled by defaultjslanguage extension is loaded (viaENABLE_LANGUAGES), but# gazelle:js disabledat the root prevents any BUILD file modificationsgazellelefthook pre-commit step so BUILD files stay in sync once generation is enabled per-package# gazelle:js enabledin that package's BUILD.bazelChanges
MODULE.bazel: Addgazelle0.48.0,rules_multitool1.11.1, and multitool extensionmultitool.lock.json: New file with prebuilt aspect-gazelle binary (2026.12.17) for darwin_arm64, linux_amd64, linux_arm64BUILD.bazel: Addgazelle()target with JS disabled globally andENABLE_LANGUAGES=jsto skip starlark/go/proto/python extensionslefthook.yml: Addgazellepre-commit commandUsage
Test plan
bazel run //:gazelle -- -mode diffexits 0 (no drift)bazel test //...)🤖 Generated with Claude Code