-
Notifications
You must be signed in to change notification settings - Fork 380
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
v0.24.0 issue with internal
package import in third party dependency
#1117
Comments
Thanks for creating the issue, we're having a similar problem. Did you ever find a workaround/patch? |
@pqn No, I didn't. I'm using 0.23.0, which works fine. |
Cross-module internal packages should be supported. If anyone has the bandwidth to solve this, it would be much appreciated. I would start by trying to add a test case that reproduces the incorrect behavior. Here are some pointers. This issue sounds similar to these previous issues: Here is the relevant code that determines visibility: These two test cases were intended to verify this exact behavior: I'm not sure what might cause the tests to pass but your usage to fail. |
This comment explains how things work. It explains why it's not deterministic in my case. It's weird that gazelle relies on what it generated before to generate the same thing again correctly. |
What version of gazelle are you using?
v0.24.0
What version of rules_go are you using?
v0.29.0
What version of Bazel are you using?
4.2.1
Does this issue reproduce with the latest releases of all the above?
Yes.
What operating system and processor architecture are you using?
macOS amd64
What did you do?
Upgraded Gazelle to v0.24.0 from v0.23.0.
What did you expect to see?
All working as before.
What did you see instead?
With v0.24.0:
With v0.23.0:
As you can see, v0.24.0 does not generate visibility configuration for the other dependencies/packages that import the
internal
package. It's unfortunate but thatinternal
package is imported by other modules in the same repo: https://github.com/googleapis/google-cloud-go/blob/45fd2594d99ef70c776df26866f0a3b537e7e69e/profiler/profiler.go#L52The error I'm getting is:
external/com_google_cloud_go_profiler/BUILD.bazel
looks like this:What's interesting is that it sometimes works and sometimes gives this error.
The text was updated successfully, but these errors were encountered: