-
Notifications
You must be signed in to change notification settings - Fork 389
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
Gazelle doesn't know how to handle imports from google/api/*.proto
#32
Comments
Not really sure what Gazelle can do with that directory without adding a lot of special cases. There are a large number of .proto files with no BUILD file. I think there would need to be a handwritten BUILD file in that directory (either upstreamed, or emplaced with a repository rule) that defines |
I'd go with external repo. As long as the generated build file is not using "//google/api" as target, I don't have to touch the build file and add I've already tried to use |
There's no way to tell whether a proto import is from an external repo or not just by looking at the import string (without special cases). They're paths that are relative to the repo root, but they could be in any repo including the workspace. When #12 is working, we'll have an index of all the proto files in external repos, so Gazelle will be able to generate correct targets. I think that will fix it. |
SG. I'll manually put these files in my workspace and put a huge It's indeed annoying to work with these special cases, as the import syntax in proto files is not built for open source world at first place :( |
@jayconrod Indexing files in current workspace works already, and I think the external one seems can be solved by using repo overlays as the build files in |
@ashi009 Sorry for the slow response; just got back from a trip. The long-term plan for repositories that need some customization (that The command to add a new repository to one of these rules or migrate an existing
After that, you'll be able to update to a new commit and update build files at the same time with I was hoping to have this working already, but a bunch of stuff has been happening in rules_go, so most of my attention has been there. I still hope to get this done soon. |
Closing this since Gazelle 0.13.0 includes special cases for protos in |
In a cursory glance it looks like these should come from https://github.com/googleapis/googleapis/blob/master/google/api/. Is it possible to specify that these are external deps and should be loaded from a
@external_repo
?The text was updated successfully, but these errors were encountered: