Skip to content

hack: use tools build constraint for generated-files deps#3236

Merged
crazy-max merged 2 commits intomoby:masterfrom
crazy-max:generated-infer-gomod
Nov 25, 2022
Merged

hack: use tools build constraint for generated-files deps#3236
crazy-max merged 2 commits intomoby:masterfrom
crazy-max:generated-infer-gomod

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Oct 29, 2022

fixes #3187
follow-up docker/buildx#1296 (comment)

Inferred go install from go.mod using tools build constraint so proto generation is aligned.

github.com/golang/protobuf/protoc-gen-go switches from 1.3.5 to 1.5.2.

Looking at the release notes and since 1.4.0:

This release of the github.com/golang/protobuf module introduces a number of significant changes relative to the previous minor release. In particular, this module is now implemented in terms of the new google.golang.org/protobuf module, which is the next major revision of Go bindings for protocol buffers. From this point onwards, most of the development effort for Go protobufs will be dedicated to the new module, with minimal changes being made to this module.

The API of this new module is not drop-in compatible with the earlier github.com/golang/protobuf module. See https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0 for backward compat.

@crazy-max crazy-max marked this pull request as ready for review October 29, 2022 08:33
@crazy-max crazy-max force-pushed the generated-infer-gomod branch 2 times, most recently from f2c9958 to 47bd4b3 Compare October 29, 2022 08:47
Copy link
Member

@jedevc jedevc left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me - I have some confusion around pb_tools.go, but otherwise looks good to me.

Nice to see the collection of shell scripts shrinking and moving into Dockerfiles.

@crazy-max crazy-max force-pushed the generated-infer-gomod branch from 47bd4b3 to 956bfce Compare November 1, 2022 08:55
@crazy-max crazy-max force-pushed the generated-infer-gomod branch from 956bfce to 27c2d39 Compare November 3, 2022 17:48
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the generated-infer-gomod branch from 27c2d39 to abe457d Compare November 17, 2022 11:59
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the generated-infer-gomod branch from abe457d to e1b3b6c Compare November 17, 2022 12:50
Copy link
Member

@jedevc jedevc left a comment

Choose a reason for hiding this comment

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

The need for tools.go is still kind of frustrating, but it feels a bit like a necessary evil - it's still an improvement on what we have today, so seems fine to me 🤷

PTAL @tonistiigi

@crazy-max
Copy link
Member Author

As discussed with tonis, I have updated the comment in the package to warn users if they want to add other tools.

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.

github.com/golang/protobuf version for generated files

3 participants