-
Notifications
You must be signed in to change notification settings - Fork 330
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
Modularize core Bazel dependencies #7
Comments
Blocker for this issue: rules_cc don't have official releases, therefore we cannot check in a specific version. |
stardoc also hasn't have new releases for a while and Bazel is using a commit that is newer than its latest release. |
Can't we just download any commit from github as a zip? Like https://github.com/bazelbuild/rules_cc/archive/6c5c8e9b41e6427033dd011f8ce52a1f2532abdc.zip, and then just make it version "0.0.0-20210924-6c5c8e9b" or something |
We can certainly do that as a workaround, but ideally projects rules_cc should have official releases. |
another way to go about this is to have source.json support git commits too; so instead of specifying an archive from a URL, you could alternatively specify a git repo and a commit/tag.
Agreed. |
But you still need a fake comparable version for that right? |
In generally, I would like people to check in well-tested release versions of their project in to BCR, instead of a random commit. |
Yeah, the only difference is that a URL like GitHub's to download an arbitrary commit as a zip isn't always available (for example, for your company's own git repos).
That's fair -- I think we should make more effort to push projects such as rules_cc to make a release then (potentially doing it ourselves). I just don't want us to be stuck in a limbo where rules_cc is reluctant to make a release, so we're just blocked on them and not making progress. |
Oh, of course, making a new release shouldn't be too hard (hopefully) and we have many other dependencies to check in. |
Wait, is this registry for Bazel's use or the community? If zlib goes here, does that mean other C++ libraries can be contributed by users? You'll have hundreds of "modules" here very quickly. |
This is for use by the community. Other C++ libraries can indeed be contributed by users.
Scalability has always been a concern of mine, but similar projects (notably Homebrew, and to some extent Debian) have functioned well with this pattern, so I think we should be able to manage. |
there is another difference which is that integrity hashes of github's archive downloads are not stable. They sometimes rollout upgrades to their frontend nodes where the |
That's a good point. To mitigate this, we also mirror all archive URLs to a GCS bucket. |
oh this is a place to automate the mirroring of new releases, that's a great improvement. of course if GitHub changes, you'll have one correct mirror and one incorrect one. |
Bazel can now be built with Bzlmod with dependencies fetched from [the Bazel Central Registry](https://github.com/bazelbuild/bazel-central-registry) (bazelbuild/bazel-central-registry#7). Changes in this PR: - Added MODULE.bazel file for Bazel - Added MODULE.bazel file for third_party/remoteapis and third_party/googleapis to make them work as Bazel modules - Updated gson to 2.8.6, because we build with protobuf 3.19.0 with Bzlmod which needs a newer version of gson. - Added WORKSPACE.bzlmod, this eventually should be empty, but for now we still need some bind rules to make some jar dependencies available for protobuf. - package-bazel.sh: use wildcard to locate the directory of the platforms repo, whose canonical repo name is `platform.<version>` when building with Bzlmod. To build Bazel with Bzlmod: - Copy WORKSPACE.bzlmod to WORKSPACE - Run `USE_BAZEL_VERSION=last_green bazelisk build --experimental_enable_bzlmod //src:bazel_nojdk` Closes #14171. PiperOrigin-RevId: 406097216
Dependencies of the Bazel project itself should be added into the Bazel Central Registry:
Blockers:
Notes:
The text was updated successfully, but these errors were encountered: