Skip to content

Conversation

jhump
Copy link
Owner

@jhump jhump commented Mar 3, 2023

If/when grpc/grpc-go#5684 is resolved, then a program that tries to link in both that reflection package and this repo's grpcreflect package will run into problems: both would try to register the same file descriptors and types in the protobuf runtime's global registry. That would lead to a panic during program init.

So this hacks the internal packages used for the v1 service to avoid such a conflict. It also updates the script that generates code to use a longer path that is much less likely to collide with a user's files.

@jhump jhump merged commit 81aa758 into master Mar 3, 2023
@jhump jhump deleted the jh/prevent-startup-panic-in-grcpreflect-internal branch March 3, 2023 20:39
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.

1 participant