feat: add Bazel (bzlmod) MODULE.bazel ecosystem checker - #23
feat: add Bazel (bzlmod) MODULE.bazel ecosystem checker#23algomaster99 wants to merge 2 commits into
Conversation
Adds pkg/bazel, checking bazel_dep entries in MODULE.bazel against the Bazel Central Registry's latest release. Prioritized (see #4) because there's no `bazel add`-style command that resolves a module's latest release and writes it into MODULE.bazel - a bazel_dep(name = ..., version = ...) entry is always hand-typed, unlike ecosystems with a `cargo add`/`go get`/`npm install` equivalent. bzlmod's dependency format has no range syntax, so every bazel_dep version is already an exact pin - same shape as go.mod's require entries. Wired into newCheckers/checkerFor in main.go, covered by unit tests, and added to benchmark/cases.json (4 fresh + 1 existing).
Records hook/nohook runs for the 5 bazel-* cases in cases.json, exercising the checker added in this PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Ran the 5 Blocking mechanism confirmed working — the hook correctly caught and forced a version bump in 3/5 cases:
Two resolver-data gaps surfaced, not bugs in the blocking logic itself:
Both are |
|
@algomaster99 please report issues like this in the relevant git-pkgs repos as well so I can keep track of them |
|
Good idea @andrew ! I will open the issue for these two cases. |
|
Added the issue: git-pkgs/enrichment#65. |
Summary
pkg/bazel, checkingbazel_depentries inMODULE.bazelagainst the Bazel Central Registry's latest release, viagit-pkgs/manifests+ an injectedresolver.Resolver.bazel add-style command that resolves a module's latest release and writes it intoMODULE.bazel— abazel_dep(name = ..., version = ...)entry is always hand-typed, unlike ecosystems with acargo add/go get/npm installequivalent.bazel_depversion is already an exact pin — same shape asgo.mod'srequireentries.newCheckers/checkerForinmain.go, covered by unit tests, and added tobenchmark/cases.json(4 fresh + 1 existing).Before: no
MODULE.bazelsupport — a stalebazel_depversion pin passes through unchecked.After:
Generated by Claude Code