You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ bazel build //...
INFO: Analysed 2 targets (56 packages loaded).
INFO: Found 2 targets...
ERROR: /private/var/tmp/_bazel_kevinrosendahl/938430ea243630148906fc2cce0e7852/external/com_github_gogo_protobuf/gogoproto/BUILD.bazel:19:1: GoCompile external/com_github_gogo_protobuf/gogoproto/darwin_amd64_stripped/go_default_library~/github.com/gogo/protobuf/gogoproto.a failed (Exit 1)
external/com_github_gogo_protobuf/gogoproto/helper.go:35:37: cannot use E_Embed (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:39:37: cannot use E_Nullable (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:43:37: cannot use E_Stdtime (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:47:37: cannot use E_Stdduration (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:94:36: cannot use E_Enumdecl (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:94:85: cannot use E_EnumdeclAll (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:98:39: cannot use E_Typedecl (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:98:88: cannot use E_TypedeclAll (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetBoolExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:106:37: cannot use E_Customtype (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:119:37: cannot use E_Casttype (type *"github.com/golang/protobuf/proto".ExtensionDesc) as type *"github.com/gogo/protobuf/proto".ExtensionDesc in argument to "github.com/gogo/protobuf/proto".GetExtension
external/com_github_gogo_protobuf/gogoproto/helper.go:119:37: too many errors
2018/03/24 18:17:17 error running compiler: exit status 1
INFO: Elapsed time: 32.263s, Critical Path: 2.50s
FAILED: Build did NOT complete successfully
The text was updated successfully, but these errors were encountered:
kevindrosendahl
changed the title
overwritting gog
overwritting gogo/protobuf dependency makes protobuf compilation fail
Mar 25, 2018
com_github_gogo_protobuf needs some special handling. They have Makefiles that run protoc with some additional flags when generating their .pb.go files. Gazelle (and go_repository) won't be able to figure that out automatically.
I'd recommend using the .pb.go files they have checked in rather than regenerating them with Bazel. Just add build_file_proto_mode = "disable" to the go_repository rule. That will skip generating go_proto_library rules and will treat .pb.go files like normal Go source files.
if you import a different version of
github.com/gogo/protobuf
than what rules_go natively includes, you can no longer compile gogo protobufs.reproduction:
hello.proto
:WORKSPACE
:(note this is even the same version as the one that rules_go natively includes, but also reproducible with other versions)
BUILD.bazel
:The text was updated successfully, but these errors were encountered: