Skip to content

Commit

Permalink
all: remove unused purego support
Browse files Browse the repository at this point in the history
fixes golang/protobuf#1640

Change-Id: I0e8f2df27c6b86a6f7325524d788c852a9266f1f
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/606755
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Lasse Folger <lassefolger@google.com>
Reviewed-by: Christian Höppner <hoeppi@google.com>
  • Loading branch information
stapelberg committed Aug 20, 2024
1 parent b643888 commit 0946f97
Show file tree
Hide file tree
Showing 102 changed files with 6 additions and 5,263 deletions.
21 changes: 0 additions & 21 deletions cmd/protoc-gen-go/internal_gengo/reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,27 +163,6 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f
}

if len(f.allMessages) > 0 {
// Populate MessageInfo.Exporters.
g.P("if !", protoimplPackage.Ident("UnsafeEnabled"), " {")
for _, message := range f.allMessages {
if sf := f.allMessageFieldsByPtr[message]; len(sf.unexported) > 0 {
idx := f.allMessagesByPtr[message]
typesVar := messageTypesVarName(f)

g.P(typesVar, "[", idx, "].Exporter = func(v any, i int) any {")
g.P("switch v := v.(*", message.GoIdent, "); i {")
for i := 0; i < sf.count; i++ {
if name := sf.unexported[i]; name != "" {
g.P("case ", i, ": return &v.", name)
}
}
g.P("default: return nil")
g.P("}")
g.P("}")
}
}
g.P("}")

// Populate MessageInfo.OneofWrappers.
for _, message := range f.allMessages {
if len(message.Oneofs) > 0 {
Expand Down
16 changes: 0 additions & 16 deletions cmd/protoc-gen-go/testdata/annotations/annotations.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 0 additions & 76 deletions cmd/protoc-gen-go/testdata/comments/comments.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions cmd/protoc-gen-go/testdata/comments/deprecated.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions cmd/protoc-gen-go/testdata/extensions/base/base.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 0 additions & 100 deletions cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions cmd/protoc-gen-go/testdata/import_public/a.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0946f97

Please # to comment.