-
Notifications
You must be signed in to change notification settings - Fork 87
Add Bazel Central Registry (BCR) publishing support #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Replaces the Node.js-based generate-version-header.js script with a C++ implementation to eliminate the Node.js runtime dependency from the build process. The new C++ tool reads package.json and generates the same version.h header file. Also fixes Closure Compiler errors under strict mode in extension_field_binary_info.js and map.js by properly assigning goog.requireType calls to const variables instead of using standalone goog.requireType calls. Changes: - Add generator/generate-version-header.cc with C++ implementation - Remove generate-version-header.js - Update generator/BUILD.bazel to use cc_binary instead of Node.js script - Add rules_cc dependency to MODULE.bazel - Update BUILD.bazel to remove deleted script from exports_files - Fix goog.requireType usage in extension_field_binary_info.js and map.js
|
Claude: Setup Instructions for BCR PublishingTo enable automated publishing to BCR, you'll need to set up a Generate the Token
Note: You must use a Classic PAT (not fine-grained) because fine-grained PATs can't currently open pull requests against public repositories like bazel-central-registry. |
dibenede
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Thank you for putting this together.
.bcr/metadata.template.json
Outdated
| "email": "dibenede@google.com", | ||
| "github": "dibenede" | ||
| }, | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mean to discredit your excellent work, but I don't think we can have non-Google employees on here for security reasons. Reading https://github.com/bazelbuild/bazel-central-registry/blob/main/docs/README.md#approval-and-submission , it sounds like this list grants access to certain BCR approval powers.
I'm happy to credit your work in a different way if you'd like. We probably overdue for some special call outs in a contributors file of some kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was going to mention this in the PR... I don't really care about being attributed in the BCR as a maintainer, but I put it in there in case it would be helpful. Will remove.
dibenede
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(selected wrong option, meant request changes)
Also add .bazelrc configuration to disallow auto-importing previously native symbols (e.g. sh_binary)
|
Comments addressed. At this point in my own projects I do:
LMK if I can assist. |
This PR adds the necessary infrastructure to publish
protobuf-javascriptto the Bazel Central Registry (BCR), making it easier for Bazel users to consume this module via Bzlmod.Changes
BCR Configuration:
.bcr/directory with BCR metadata templates and configurationmetadata.template.json- Module metadata for BCRsource.template.json- Source archive configurationpresubmit.yml- BCR presubmit validation rulespatches/remove-dist.patch- Patch to remove distribution rules (and dev dependencies) from BCR releasesEnd-to-End Testing:
e2e/bcr/test suite to validate BCR integrationprotoc-gen-jsDependencies:
rules_cctoMODULE.bazelfor C++ build supportMODULE.bazelwith proper dependency orderingTesting
The BCR integration can be tested by running: