mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-26 21:24:22 +00:00
cmd/protoc-gen-go: remove reference to legacy ProtoPackageIsVersion4
A reference to this constant was originally generated to ensure that users were using a sufficiently new version of the github.com/golnag/protobuf module to avoid subtle runtime incompatibility issues. Such a technique is not needed if users were using modules, which would enforce this constraint based on our go.mod requirements. When we first released the google.golang.org/protobuf module, we suggested that we would consider removing it after 6 months. It has now been 7 months since the release. Fixes golang/protobuf#1077 Change-Id: I9f2010da27b27fe6b12541a15833721441df8409 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/259901 Reviewed-by: Damien Neil <dneil@google.com> Trust: Joe Tsai <thebrokentoaster@gmail.com>
This commit is contained in:
parent
ac374a2335
commit
4394568c4b
@ -88,12 +88,6 @@ func GenerateFile(gen *protogen.Plugin, file *protogen.File) *protogen.Generated
|
||||
g.P("_ = ", protoimplPackage.Ident("EnforceVersion"), "(", protoimplPackage.Ident("MaxVersion"), " - ", protoimpl.GenVersion, ")")
|
||||
g.P(")")
|
||||
g.P()
|
||||
|
||||
// TODO: Remove this after some soak-in period after the v2 release.
|
||||
g.P("// This is a compile-time assertion that a sufficiently up-to-date version")
|
||||
g.P("// of the legacy proto package is being used.")
|
||||
g.P("const _ = ", protoV1Package.Ident("ProtoPackageIsVersion4"))
|
||||
g.P()
|
||||
}
|
||||
|
||||
for i, imps := 0, f.Desc.Imports(); i < imps.Len(); i++ {
|
||||
|
Loading…
Reference in New Issue
Block a user