wasilibs / go-protoc-gen-es

MIT License
4 stars 1 forks source link

go-protoc-gen-es seems to be generating wrong imports for TS #39

Closed jeffsaremi closed 3 hours ago

jeffsaremi commented 4 hours ago

go install github.com/wasilibs/go-protoc-gen-es/cmd/protoc-gen-es@v1.10.0

File: buf.gen.yaml

  - name: es
    out: ./web/src/gen/ts
    opt:
      - target=ts

After issuing buf generate protos --template protos/buf.gen.yaml

this is what I get: File: common_pb.ts

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";

Of the above imports, proto3 , PartialMessage, PlainMessage don't seem to exist in @bufbuild/protobuf

  "dependencies": {
    "@bufbuild/protobuf": "^2.2.2",
jeffsaremi commented 3 hours ago

Just realized that the version of go-protoc-gen-es must match that of @bufbuild Closing this