-
Notifications
You must be signed in to change notification settings - Fork 387
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
how does one go from a proto file to a dependency now? #94
Comments
(Edited this issue with some more clarity about the questions stemming from |
(Also, I should point out that rules_go's go_proto_library is now undocumented in its repo and I'm not sure what I'm supposed to use, anymore.) |
Sorry for the slow response -- was out sick most of last week. If Gazelle is not generating any rules in a directory with .proto files, it sounds like you might not be in the When the proto mode is not set explicitly, Gazelle attempts to infer it. It will go into Here's a minimal example: //:BUILD.bazel
//foo:foo.proto
//bar:bar.go
Running Gazelle should produce these rules in //foo:BUILD.bazel
|
Is "legacy" the default for gazelle 0.9? I moved my sessint.proto into its own directory without a BUILD or BUILD.bazel file in it and ran |
My gazelle definition is:
|
Ah! I had to add Why is the gazelle rule in "legacy" mode in an empty directory? |
Okay, weird, in a different directory that I already had a single proto file set up using the old Very strange |
BOOM! Figured it out! If in a parent directory, you have a |
Made #104 |
Thanks so much, by the way! |
This is with gazelle 0.8.0.
I had a go_proto_library call in the same BUILD.bazel as my go_library that used it. But that breaks (even with
# gazelle:proto disable
) because the dependency in my go_library gets a:go_default_library
tagged to the end of it.So, I was like, okay, I'll move the proto file to its own directory. But am I supposed to also write my own go_proto_library in that directory's BUILD.bazel now?
The docs for
gazelle:proto
seem to imply that there is some auto-magically created proto rules now but I'm not sure how to get those to be generated. Having an empty file in that directory didn't do anything. There's "Fix command transformations" docs say if you use the go_proto_library from the loadpath I've been using, things won't work correctly, but doesn't mention what you're supposed to do instead.What's the deal now?
The text was updated successfully, but these errors were encountered: