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
The dependency on @com_github_golang_protobuf//ptypes/duration:go_default_library is added by a special case for the Well Known Types. This is necessary because there isn't currently a way to import protos in different repositories. We also use the pregenerated .pb.go files for these libraries because it's difficult to build these automatically without any tweaking.
These dependencies prevent gogoproto from being used, since that plugin has its prebuilt code for these libraries in a different repository. We could add more special cases to Gazelle to handle this, but ultimately, Gazelle shouldn't have to know which plugin you're using. The toolchain should handle this instead.
The toolchain could add implicit dependencies on go_libraries for the Well Known Types appropriate for whichever plugin is being used. In go_proto_library rules, you would not need to write these dependencies. This would be analogous to implicit dependencies on Go standard library packages. The Well Known Types are a kind of standard library for protos after all.
The text was updated successfully, but these errors were encountered:
Suppose you have a proto that imports
google/protobuf/duration.proto
. Gazelle will generate rules like this:The dependency on
@com_github_golang_protobuf//ptypes/duration:go_default_library
is added by a special case for the Well Known Types. This is necessary because there isn't currently a way to import protos in different repositories. We also use the pregenerated .pb.go files for these libraries because it's difficult to build these automatically without any tweaking.These dependencies prevent gogoproto from being used, since that plugin has its prebuilt code for these libraries in a different repository. We could add more special cases to Gazelle to handle this, but ultimately, Gazelle shouldn't have to know which plugin you're using. The toolchain should handle this instead.
The toolchain could add implicit dependencies on
go_libraries
for the Well Known Types appropriate for whichever plugin is being used. Ingo_proto_library
rules, you would not need to write these dependencies. This would be analogous to implicit dependencies on Go standard library packages. The Well Known Types are a kind of standard library for protos after all.The text was updated successfully, but these errors were encountered: