planetscale/vtprotobuf

Panic after WKT commit: assignment to entry in nil map

coxley opened this issue · 2 comments

coxley commented

Using the commit from #99: go install github.com/planetscale/vtprotobuf/cmd/protoc-gen-go-vtproto@d49cd97

Nothing special about the parameters seem to change it:

protoc -Iprotos/protobuf \
  --go-vtproto_out=paths=source_relative,<omitted module rewrites>:gen \
  --go-vtproto_opt=features=marshal+unmarshal+size+pool+clone \
  <protos>
panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/planetscale/vtprotobuf/generator.(*ObjectSet).Set(0x72bfa0?, {0xc00015c650?, 0xc00015c64b?})
 /root/go/pkg/mod/github.com/planetscale/vtprotobuf@v0.5.1-0.20231002074546-d49cd97e76bd/generator/generator.go:43 +0x109
flag.(*FlagSet).Set(0xc0000665a0, {0xc00015c64b, 0x4}, {0xc00015c650, 0x54})
 /usr/lib/go-1.19/src/flag/flag.go:488 +0x78
google.golang.org/protobuf/compiler/protogen.Options.New({0xc000022640?, 0x0?}, 0xc000112cb0)
 /root/go/pkg/mod/google.golang.org/protobuf@v1.26.0/compiler/protogen/protogen.go:206 +0x138d
google.golang.org/protobuf/compiler/protogen.run({0xc000022640?, 0x0?}, 0xc000055f58)
 /root/go/pkg/mod/google.golang.org/protobuf@v1.26.0/compiler/protogen/protogen.go:70 +0x125
google.golang.org/protobuf/compiler/protogen.Options.Run({0xc000022640?, 0x0?}, 0xc000022630?)
 /root/go/pkg/mod/google.golang.org/protobuf@v1.26.0/compiler/protogen/protogen.go:52 +0x2a
main.main()
 /root/go/pkg/mod/github.com/planetscale/vtprotobuf@v0.5.1-0.20231002074546-d49cd97e76bd/cmd/protoc-gen-go-vtproto/main.go:30 +0x1fa
--go-vtproto_out: protoc-gen-go-vtproto: Plugin failed with status code 2.
vmg commented

My bad. Can you try pulling main again? :)

coxley commented

@vmg So fast — fixed. :)

typing-typing-fast-gif