-
Notifications
You must be signed in to change notification settings - Fork 367
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
Make # gazelle:proto file
work without needing to set different option go_package
in .proto files
#1765
Merged
linzhp
merged 18 commits into
bazelbuild:master
from
jeromep-stripe:jeromep/file-mode-patch
May 20, 2024
Merged
Make # gazelle:proto file
work without needing to set different option go_package
in .proto files
#1765
linzhp
merged 18 commits into
bazelbuild:master
from
jeromep-stripe:jeromep/file-mode-patch
May 20, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t.go file (bazelbuild#1597) * add a go_test directive to enable generating go_test targets per _test.go file * address comments * add new tests for updating to per-file mode --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@linzhp FYI -- let @jeromep-stripe know what you think. |
Ping on this @linzhp -- let us know what we can do to help. |
Oh, sorry, I missed the previous ping. Let me take a look later this week. |
(Gentle nudge on this; hope you have a good weekend, happy to discuss if you'd like.) |
linzhp
reviewed
May 5, 2024
Some minor comments. LGTM overall. I also tested it in Uber's Go repo. |
@linzhp ty for the review, I addressed your comments! |
linzhp
approved these changes
May 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Feature
What package or component does this PR mostly affect?
language/go
What does this PR do? Why is it needed?
This changes the gazelle's
go_proto_library
generation behavior.Previously, in .proto file mode, gazelle would generate a separate
go_proto_library
target for eachproto_library
target, and these would have the same values for the importpath attribute. This caused build errors in certain situations.This change makes Gazelle group
proto_library
targets which would otherwise have the samego_proto_library
importpath, into a singlego_proto_library
using theprotos
attribute.Which issues(s) does this PR fix?
Fixes #1724
Other notes for review
bazelisk test //...
and saw two tests failThis looks like an environment issue. Looks like CI is green though, so I think we can ignore this.
go_proto_library
target for multipleproto_library
targets, the change creates acombinedImports
platformStringsBuilder variable. I'm not sure if my general approach to combining the dependencies is correct, and would appreciate guidance.