Skip to content

compiler/protoc: a Go wrapper around protoc #801

@myitcv

Description

@myitcv

Is your feature request related to a problem? Please describe.

Yes. I'm required to manually discover and then install the correct version of the standard C++ compiler (per https://github.com/golang/protobuf#installation). I say "correct" because I want to ensure that the contents of https://github.com/golang/protobuf/blob/master/protoc-gen-go/descriptor/descriptor.pb.go (for example) correspond to the correct compiler version, i.e. regenerating github.com/golang/protobuf/protoc-gen-go/descriptor should be a no-op.

Describe the solution you'd like

Ideally, if I use v1.2.0, say, of github.com/golang/protobuf (via Go modules) then there should be a Go-based wrapper around protoc (e.g. github.com/golang/protobuf/protoc) that downloads and runs the correct version (v3.6.1) as required.

Describe alternatives you've considered

Manually discovering the correct version to install from:

- curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip -o /tmp/protoc.zip

installing a non-Go dependency, writing scripts, etc.

Additional context

I haven't fully kept up to speed with your plans for v2, so apologies if this is covered elsewhere.

This would also make the protoc compiler a fully-fledged Go dependency, and would therefore make it more conducive to using via go generate or gg

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions