Skip to content

grpc-xds: Use protobuf-generated modules - #2958

Merged
ejona86 merged 2 commits into
grpc:masterfrom
ejona86:grpc-xds-gencode-cleanup
Nov 10, 2026
Merged

ejona86 merged 2 commits into
grpc:masterfrom
ejona86:grpc-xds-gencode-cleanup

Conversation

@ejona86

@ejona86 ejona86 commented Oct 23, 2026

Copy link
Copy Markdown
Member

In 0858621 we had to invoke protoc separately for each .proto and construct our own mod structure, because protoc failed to generate code if two messages had the same name, even if those messages were in different packages. Now that 0ecf925 upgraded to Protobuf 36.2, we no longer need to make our own structure, and can simplify the build.rs (even if the resulting mods aren't as obvious as what we had developed ourselves).

In 0858621 we had to invoke protoc separately for each .proto and
construct our own mod structure, because protoc failed to generate code
if two messages had the same name, even if those messages were in
different packages. Now that 0ecf925 upgraded to Protobuf 36.2, we no
longer need to make our own structure, and can simplify the build.rs
(even if the resulting mods aren't as obvious as what we had developed
ourselves).
@ejona86
ejona86 requested a review from gu0keno0 October 23, 2026 23:19
@ejona86

ejona86 commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

@dfawley, you may want to take a glance to see the module naming scheme protobuf is using.

@ejona86

ejona86 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

TODO: fix the test imports.

@ejona86

ejona86 commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

@gu0keno0, do you want to take a look?

@gu0keno0 gu0keno0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks. With the use statements, hopefully we don't need to worry about these paths that much.

@ejona86
ejona86 merged commit 950fa06 into grpc:master Nov 10, 2026
30 checks passed
@ejona86
ejona86 deleted the grpc-xds-gencode-cleanup branch November 10, 2026 18:27
@YutaoMa

YutaoMa commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@ejona86 😢 CI failed because the #2920 code didn't get the rename, could you help fix it, thanks!

@ejona86

ejona86 commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

I've sent out #3021 to fix it.

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.

3 participants