-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
language/proto: Missing dependencies with go_package
grouping
#1219
Comments
nickgooding
added a commit
to nickgooding/bazel-gazelle
that referenced
this issue
Apr 12, 2022
Fixes an issue where dependencies would be missed in the case where an import was of a proto file in the same directory but from a different target, such an when using `proto_group`. This would cause Gazelle to generate `proto_library` and `go_proto_library` targets that could not be built. Fixes bazel-contrib#1219
I can confirm that we're facing the same issue, introduced by the same commit, and that @nickgooding's PR fixes the issue for us. Thanks! |
achew22
pushed a commit
that referenced
this issue
Apr 20, 2022
Fixes an issue where dependencies would be missed in the case where an import was of a proto file in the same directory but from a different target, such an when using `proto_group`. This would cause Gazelle to generate `proto_library` and `go_proto_library` targets that could not be built. Fixes #1219
nickgooding
added a commit
to nickgooding/rules_go
that referenced
this issue
Jun 9, 2022
The latest generation of the Gazelle patch of go_googleapis appears to have been performed with Gazelle v0.25.0, which includes an unfortunate bug that means dependencies will be missing for some proto_library targets (bazel-contrib/bazel-gazelle#1219). The fix for this has now been merged but not yet released, so I have run the generation again with Gazelle built from bazel-contrib/bazel-gazelle@0408bc8 Closes: bazel-contrib#3192
nickgooding
added a commit
to nickgooding/rules_go
that referenced
this issue
Jun 9, 2022
The latest generation of the Gazelle patch of go_googleapis appears to have been performed with Gazelle v0.25.0, which includes an unfortunate bug that means dependencies will be missing for some proto_library targets (bazel-contrib/bazel-gazelle#1219). The fix for this has now been merged but not yet released, so I have run the generation again with Gazelle built from bazel-contrib/bazel-gazelle@0408bc8 Fixes bazel-contrib#3192
linzhp
pushed a commit
to bazel-contrib/rules_go
that referenced
this issue
Jun 18, 2022
The latest generation of the Gazelle patch of go_googleapis appears to have been performed with Gazelle v0.25.0, which includes an unfortunate bug that means dependencies will be missing for some proto_library targets (bazel-contrib/bazel-gazelle#1219). The fix for this has now been merged but not yet released, so I have run the generation again with Gazelle built from bazel-contrib/bazel-gazelle@0408bc8 Fixes #3192
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of gazelle are you using?
v0.25.0
What version of rules_go are you using?
v0.31.0
What version of Bazel are you using?
5.0, 5.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Mac OS 12.3, x86_64-apple-darwin21.1.0
What did you do?
Using Gazelle to generate
proto_library
andgo_proto_library
targets usinggazelle:proto package
andgazelle:proto_group go_package
directives with Proto files that share a Proto package, but have separate Go packages. I've pushed a simple reproduction of the issue here: https://github.com/nickgooding/bazel-gazelle-1219-reproWhat did you expect to see?
proto_library
andgo_proto_library
targets should be generated with appropriatedeps
proto_library
andgo_proto_library
targets should be buildableWhat did you see instead?
proto_library
andgo_proto_library
targets are missingdeps
forproto_library
/go_proto_library
targets that belong to the same Proto package but have different Go packagesproto_library
andgo_proto_library
targets fail to build due to the missing dependenciesUsing
git bisect
, it appears that 6bbfc47 is the commit where these dependencies stopped being generated. A similar issue, #1157 was raised regarding per-file Proto mode, but the fix for that does not appear to have resolved the issue when usinggo_package
grouping.The text was updated successfully, but these errors were encountered: