Skip to content

feat(bazel): make googleapis a Bzlmod module#892

Closed
keith wants to merge 5 commits into
googleapis:masterfrom
keith:ks/add-bzlmod
Closed

feat(bazel): make googleapis a Bzlmod module#892
keith wants to merge 5 commits into
googleapis:masterfrom
keith:ks/add-bzlmod

Conversation

@keith

@keith keith commented Mar 27, 2024

Copy link
Copy Markdown

This depends on bazelbuild/bazel-central-registry#1699 because of a circular dependency on grpc-java

This is based on #855 with some fixes

Comment thread MODULE.bazel
switched_rules.use_languages(
cc = True,
# csharp = True,
# gapic = True,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i left some of these out, which means not everything in the repo builds with bzlmod enabled, in order to support each of these we'll have to move their deps to bzlmod, which is potentially difficult depending on their transitives

@meteorcloudy meteorcloudy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this a great start!

Comment thread WORKSPACE.bzlmod

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

_disco_to_proto3_converter_version = "74c0ede1e6871c878de6c3cab3ef152280c6518f"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those only dev dependencies?

@keith keith Mar 28, 2024

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they aren't. i didn't handle all the different language specific dependencies here, and this one is one that was easy enough to throw here so that a few more targets built when testing the integration in this repo.

@keith keith marked this pull request as ready for review April 12, 2024 18:42
@keith keith requested a review from meteorcloudy April 12, 2024 18:42
@keith

keith commented Apr 12, 2024

Copy link
Copy Markdown
Author

the dependency is merged so this is reviewable now!

@keith

keith commented May 24, 2024

Copy link
Copy Markdown
Author

@meteorcloudy could you help route this?

@meteorcloudy

Copy link
Copy Markdown

I'll ask around

@michaelschuett-tomtom

Copy link
Copy Markdown

Thank you for this. Saved me a ton of time instead of trying to figure out how to port switched_rules over. I feel like that should be documented some place although it's not documented for use in WORKSPACE as well so not really regressing at all here.

@keith

keith commented Jun 4, 2024

Copy link
Copy Markdown
Author

yea i think if this gets merged we can improve these things. this is already included in the BCR and there are a few examples in there like grpc-java using this extension

@meteorcloudy

Copy link
Copy Markdown

@Wyverald will follow this up with the internal teams. We should really improve the protobuf + grpc + googleapis situation.

@mering

mering commented Aug 19, 2024

Copy link
Copy Markdown

@meteorcloudy any updates?

@Wyverald

Copy link
Copy Markdown

Hello -- I'm still in talks with the team internally at Google. There's a concurrent proposal to reshape the project structure or something, and they're apparently exploring other options of exposing the protos to downstream users.

@neilconway

Copy link
Copy Markdown

@Wyverald Any news on this?

@loeffel-io

Copy link
Copy Markdown

+1

@Wyverald

Copy link
Copy Markdown

Hi all, sorry for missing this here -- the googleapis repo owners will not be taking on Bzlmod migration work. Instead, the community has settled around maintaining patches on the BCR directly -- see https://registry.bazel.build/modules/googleapis.

We should probably close this PR.

@keith keith closed this Feb 25, 2025
@keith keith deleted the ks/add-bzlmod branch February 25, 2025 18:47
@meteorcloudy

Copy link
Copy Markdown

See more details in bazelbuild/bazel-central-registry#3472, we believe the new approach will simplify the use of googleapis with Bzlmod and avoid polluting your dependency graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants