bazel: plain bazel_deps via an in-tree registry - #262
Merged
Merged
Conversation
Make kepler-formal's Bazel build ready to be a Bazel Central Registry module: MODULE.bazel contains only bazel_deps, and nothing in the build runs cmake or probes the host. - Delete bazel/deps.bzl and every overlay, patch and repository rule: rules_foreign_cc builds of capnproto, oneTBB and slang; host bison, flex, m4 and python3-config; vendored Boost, tomlplusplus and FlexLexer.h; the naja BUILD-file patches and the naja_cc_library and -iquote include wrappers. - Retire //:deps, which only existed to hand cmake-built install trees to the CMake flow. - Depend on BCR modules (onetbb, spdlog, yaml-cpp, googletest, rules_python, ...) and on naja's own targets instead of an aggregate @naja library. - bazel/registry/: a file registry in BCR's layout for what is not on BCR yet (kissat 4.0.4, cadical 3.0.0, glucose 4.2.1 at upstream master, naja, and naja's naja-if, naja-verilog, sv-lang and bison entries), listed ahead of BCR in .bazelrc. Publishing a module is copying its directory into a BCR pull request. - Embedded Python is the rules_python hermetic runtime; the driver finds it in runfiles, and the release tarball bundles it. - .bcr/ templates for publish-to-bcr. - llvm 0.8.24; tests with their own main() use gtest, not gtest_main. CI installs no host packages for Bazel. CMake and the thirdparty/ submodules are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
So agents (and people) keep the Bazel build BCR-ready: what may go in MODULE.bazel, how the in-tree registry relates to naja's, how to publish to BCR, and the toolchain, linking and embedded-Python traps already hit once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orms - .bcr/metadata.template.json lists xtofalex and nanocoh as the kepler-formal module's BCR maintainers. - overlay/MODULE.bazel files are copies, not symlinks: BCR rejects symlinks in registry entries. Contents (and source.json) unchanged. - kissat, cadical, glucose presubmit: debian13, ubuntu2204, ubuntu2404, macos_arm64 on Bazel 8.x and 9.x (debian11 is past end of life). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Synced from naja's registry: naja-if and naja-verilog list xtofalex and nanocoh as BCR maintainers, and presubmit on debian13, ubuntu2204, ubuntu2404 and macos_arm64 with Bazel 8.x and 9.x. CLAUDE.md notes the maintainers and that registry entries hold no symlinks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Synced from naja's registry. naja still asks for bcr.10, which the hermetic llvm toolchain needs, and the highest version wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bison, sv-lang, naja-if, naja-verilog, kissat, cadical and glucose are submitted to BCR, one pull request each (bazelbuild/ bazel-central-registry#10879-#10885). .bazelrc (and the consumer test's) lists each PR's commit as a registry ahead of BCR; drop a line as its PR merges. bazel/registry/ keeps only naja's development pin, bumped to naja#457's current head merged with #455 (d298a369), which takes sv-lang 11.0.0-20260701-b60d729d.bcr.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
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.
Makes kepler-formal's Bazel build idiomatic, so it can be published as a Bazel Central Registry module:
MODULE.bazelcontains onlybazel_deps,rules_foreign_ccis gone from the module graph, and nothing is probed on the host.Ready to merge once CI is green. Bazel-only change.
BCR pull requests, for now. Modules not on BCR yet come from their BCR pull requests, pinned by commit in
.bazelrc, until those merge. Each.bazelrcline is replaced by the proper BCR module as it lands. Meanwhile, a rootMODULE.bazelproject depending on this one has to carry the same.bazelrcregistry lines (plus kepler-formal'sbazel/registry/for naja, by pinned URL; seedocs/bcr-roadmap.md).What changed
Removed:
bazel/deps.bzland every overlay, patch and repository rule:rules_foreign_ccbuilds of capnproto, oneTBB and slangpython3-confignaja_cc_library/-iquotewrappersPruned the unused
//:depsexperimental feature; it got no traction.Dependencies: BCR modules (
onetbb,spdlog,yaml-cpp,googletest,rules_python, …) plus naja's own targets instead of an aggregate@najalibrary.Modules not on BCR yet come from their BCR pull requests, one module each, which
.bazelrclists by commit ahead of BCR. Drop a line as its PR merges.kissat4.0.4cadical3.0.0glucose4.2.1-20251230-674dbbaprintfinif (verbosity > 0), whichSATSolverWrapperalready asks for withverbosity = -1naja-if,naja-verilogsv-lang,bisonbazel/registry/keeps onlynaja: bazel: plain bazel_deps from BCR, no host tools najaeda/naja#457 merged with #455 (oharboe/naja@kepler-pin), until naja is released and on BCR.Embedded Python is the
rules_pythonhermetic runtime.CppDriver.cpppointsPYTHONHOMEat it in runfiles, in the Bazel build only. The release tarball bundles it, and its wrapper setsPYTHONHOME. TBB is now linked statically intolibnaja_runtime.so, so it's no longer bundled separately.Also:
.bcr/templates for publish-to-bcr.main()usegtest(googletest 1.18'sgtest_mainwould add a secondmain).CI: Bazel workflows install no packages. The consumer smoke test uses the same registries and no
rules_foreign_cc.Testing
bazel test //...(Bazel 8.6, hermetic-llvm): 11/11 pass, including the Python-primitives test..github/consumer-testbuilds on Bazel 9.2.bazel mod graphhas norules_foreign_cc.Notes
🤖 Generated with Claude Code