Delete versions from generated code #127
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this was just doing what
protoc-gen-go-grpc
was doing (?). This deletes the versions from the generated code and capitalizes "Source":Having these in the generated code is a constant source of frustration for people, it means that every time you do an upgrade of connect, you get a huge diff, and in theory for no reason - we only really care about whether the file is compatible or not, which we get through the compile-time assertion with
IsAtLeast*
. There's an argument to keep theprotoc-gen-connect-go
version, as this could be useful information for debugging, especially if using i.e. BSR remote generation, but theprotoc
version definitely should go IMO - you shouldn't have to care what version ofprotoc
you are using outside of using the builtin plugins (java, cpp, etc). Even more to the point,buf
stopped emitting aprotoc
version, so this will always be(unknown)
withbuf
.If we do want to keep the
protoc-gen-connect-go
version, I'd argue to do it in the form that Twirp does, inlining it in theCode generated by
line https://github.com/twitchtv/twirp/blob/main/example/service.twirp.go#L1