protobuf: Why i can not upgrade to version 3? Help me ~~
protoc --version
libprotoc 3.4.0
and has been running:
go get -u github.com/golang/protobuf/protoc-gen-go
it means protoc version is 3.4.0 and protoc-gen-go is latest version
and also had already added
syntax = "proto3";
at a.proto file head
when i run
protoc --go_out=. a.proto
the Code generated by protoc-gen-go also contains
// This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated.
and
var fileDescriptor0 = []byte{ // 120 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x33, 0xd4, 0x4f, 0xcd, 0x2b, 0xc9, 0x2c, 0xa9, 0xd4, 0x4f, 0x4a, 0xcc, 0xc9, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2c, 0x33, 0xd4, 0x83, 0x88, 0x2a, 0x45, 0x71, 0xb1, 0x38, 0x25, 0xe6, 0xe4, 0x08, 0xc9, 0x72, 0x71, 0x15, 0xe4, 0x17, 0x67, 0x96, 0x64, 0xe6, 0xe7, 0xc5, 0x57, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x05, 0x71, 0xc2, 0x44, 0x22, 0x50, 0xa4, 0x2b, 0x25, 0x98, 0x50, 0xa5, 0x23, 0x85, 0x44, 0xb8, 0x58, 0x13, 0xf3, 0xd2, 0x73, 0x52, 0x25, 0x98, 0xc1, 0x32, 0x10, 0x8e, 0x13, 0xcf, 0x2a, 0x26, 0x84, 0x4d, 0x49, 0x6c, 0x60, 0xbb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x01, 0x63, 0xdb, 0x39, 0x93, 0x00, 0x00, 0x00, }
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (4 by maintainers)
This caused severe issues for me, when trying to figure out where the incorrect version was loaded from. It would be very helpful if there was some verbose flag on the protobuf generator, which could display information on versions and where plugins are loaded, etc.
I managed to track down the problem by running
fs_usageon my Mac while executing the genratorThere is the culprit!
This path setup came from my
.zshrcfilewhich prepends the google paths
It’s inappropriate to use issues as a support mechanism. It’s very inappropriate to use it when the issue is unrelated to this project.