Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

EdSchouten
Copy link
Collaborator

By default, Gazelle will use use the ancient go_grpc compiler for generating Protobuf and gRPC bindings. What's inconvenient about that is that those bindings don't use the grpc.ServiceRegistrar interface that was added back in 2020:

grpc/grpc-go#3966

Instead, it uses concrete type *grpc.Server. In Buildbarn I need to make use of the interface to support things like xDS, which grpc-go only offers via a different concrete server type.

In the past I never had to care about this, because I would regenerate these sources myself. Now that I want to remote-apis through bzlmod, this is less practical.

@bergsieker As you mentioned during the monthly meeting, you wanted people to give the bzlmod code a spin before pushing it into BCR. Here you go! ;-)

@EdSchouten
Copy link
Collaborator Author

cc @philwo #307

EdSchouten added a commit to buildbarn/bb-storage that referenced this pull request Sep 10, 2024
remote-apis just switched to bzlmod. This change patches up bb-storage
to depend on it as a module, instead of pulling it in via Gazelle. Right
now this still requires us to apply a local patch, because the
go_proto_library() targets in remote-apis use the old gRPC v1 compiler
for generating sources. See this PR for more details:

bazelbuild/remote-apis#308
EdSchouten added a commit to buildbarn/bb-storage that referenced this pull request Sep 10, 2024
remote-apis just switched to bzlmod. This change patches up bb-storage
to depend on it as a module, instead of pulling it in via Gazelle. Right
now this still requires us to apply a local patch, because the
go_proto_library() targets in remote-apis use the old gRPC v1 compiler
for generating sources. See this PR for more details:

bazelbuild/remote-apis#308
EdSchouten added a commit to buildbarn/bb-storage that referenced this pull request Sep 10, 2024
remote-apis just switched to bzlmod. This change patches up bb-storage
to depend on it as a module, instead of pulling it in via Gazelle. Right
now this still requires us to apply a local patch, because the
go_proto_library() targets in remote-apis use the old gRPC v1 compiler
for generating sources. See this PR for more details:

bazelbuild/remote-apis#308
jjardon added a commit to buildbarn/bb-remote-asset that referenced this pull request Sep 11, 2024
remote-apis just switched to bzlmod. This change patches up bb-storage
to depend on it as a module, instead of pulling it in via Gazelle. Right
now this still requires us to apply a local patch, because the
go_proto_library() targets in remote-apis use the old gRPC v1 compiler
for generating sources. See this PR for more details:

bazelbuild/remote-apis#308
By default, Gazelle will use use the ancient go_grpc compiler for
generating Protobuf and gRPC bindings. What's inconvenient about that is
that those bindings don't use the grpc.ServiceRegistrar interface that
was added back in 2020:

grpc/grpc-go#3966

Instead, it uses concrete type *grpc.Server. In Buildbarn I need to make
use of the interface to support things like xDS, which grpc-go only
offers via a different concrete server type.

In the past I never had to care about this, because I would regenerate
these sources myself. Now that I want to remote-apis through bzlmod,
this is less practical.
@EdSchouten EdSchouten force-pushed the eschouten/20240910-grpc-v2 branch from 7b302c5 to 2cc02f9 Compare September 16, 2024 19:44
@EdSchouten
Copy link
Collaborator Author

Rebased to account for #310. @bergsieker PTAL!

@bergsieker bergsieker merged commit de1d77b into bazelbuild:main Sep 16, 2024
1 check passed
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.

2 participants