-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
protoc-gen-gogoroach: use gogo/protobuf fork #129182
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
5808668
to
ab2a001
Compare
Switch to using the `cockroachdb/gogoproto` fork for code generation (we added a new code generation feature that we will want to make use of). The generated code still uses `gogo/protobuf` because it is necessary for interop with other `gogo` packages. Our fork made no changes to the packages used by generated code. The diffs in the .pb.go files are inconsequential (mostly just internal package alias names). They can be inspected here: https://gist.github.com/RaduBerinde/e1a20396bad4004d84546b83c0cdd1fa Epic: none Release note: None
ab2a001
to
da7a624
Compare
Why is this? Can you provide some examples? On its face, it is very confusing to have the original version of the code and the fork imported in the same repo. I can see how that could introduce issues down the line. I would prefer not to do this unless we have no other option. |
Any dependency that has its own |
Can you be more specific? What dependencies have their own If we are cutting over to the new fork, we should cut over to the fork (i.e. update the dependencies with the hard-coded references to |
One is ours ( There are probably others. I think it will be inevitable to eventually fork all of them so maybe I should just bite the bullet and do it now? |
If you must get this PR in soon to address some sort of issue, I will approve this PR and we can take this as a follow-up item. However as you can see it puts us in a very confusing state where we actually have two separate forks of the same repo vendored into CRDB. I can very easily see someone making a change in our fork and updating (Yes, you currently have all this information in your head, but not everyone will have access to all this knowledge.) It will of course be more difficult to get in there, do the forks, update the paths, etc., but at the end of that process we will have an understandable network of forks that we fully manage and will not be left in this "purgatory" state where we have two forks of the same code handing off between the other in confusing/surprising ways. |
The immediate motivation for this PR is to bake in the improvements in #134481 instead of maintaining separate marshal/unmarshal code. This is a full list of packages that depend on We'd need to fork all of these if we wanted to completely get rid of the original one.. I don't think that's feasible.. I really with |
Actually, I might be wrong about |
I think for that to work, we'd need to keep the original paths in the fork's go.mod. I updated them (cockroachdb/gogoproto@e506ef9 and cockroachdb/gogoproto@fd7236b) because it was impossible to run any of the tests inside the repo. But maybe we can maintain a "mirror" of master that has the updated paths that can be used for development inside the fork. |
Good news, I reverted the module path changes in our fork and used the |
Just for completeness, the We could probably just bring this in-house and then also generate the |
Switch to using the
cockroachdb/gogoproto
fork for code generation(we added a new code generation feature that we will want to make use
of).
The generated code still uses
gogo/protobuf
because it is necessaryfor interop with other
gogo
packages. Our fork made no changes tothe packages used by generated code.
The diffs in the .pb.go files are inconsequential (mostly just
internal package alias names). They can be inspected here:
https://gist.github.com/RaduBerinde/e1a20396bad4004d84546b83c0cdd1fa
Informs: #134805
Release note: None