-
-
Notifications
You must be signed in to change notification settings - Fork 661
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 marks packages as internal for some reason #660
Comments
The offending line appears to be this: There's some override happening that rewrites from |
"internal" directories are supposed to be private. We should probably actually be more restrictive there, since they should be private to the directory that contains them, not the whole repository. This seems like an issue with vendoring though. I'll analyze further tomorrow. At the moment, external dependencies and vendoring don't mix well in Gazelle. |
Let me know if there's some work around. Here's the workspace and the dependency: https://github.com/istio/pilot/pull/966/files#diff-09498dbadf45966909850dc8a47ebb13R287 |
I don't have a simple fix for this yet, but I'll explain why it's happening, and I can tell you what we're doing to fix it. The error is coming from a rule in an external repository defined with There is no way to switch Gazelle into vendored mode for I think the bug here is that we're even generating rules for packages in vendor directories. Nothing will depend on these packages, and the rules we are generating don't make sense. Gazelle should not recurse into vendor directories in external mode. In #608 I'm working on a "flat mode" for Gazelle. This will allow you to generate a single BUILD file for an external repository and use that with |
In external mode, nothing will depend on rules in vendor directories. They are not likely to build. Fixes bazel-contrib#660
Thanks for explanation! I'm using a simple workaround of disabling visibility checks at the moment. Looking forward to flat mode. |
In external mode, nothing will depend on rules in vendor directories. They are not likely to build. Fixes #660
Trying to build k8s client-go from HEAD produces the following error:
Peeking into BUILD file for x/text, I find this:
Why is visibility not public?
The text was updated successfully, but these errors were encountered: