Skip to content
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

Give a better warning when using gazelle_override that this will break downstream packages #2029

Open
Martin-Idel opened this issue Feb 10, 2025 · 0 comments

Comments

@Martin-Idel
Copy link

I had an issue which I seemingly could solve with using gazelle_override in a library package. However, a couple of weeks later when the library was used, I ran into this problem here: #1543

I don't want to dispute this - but I think there should be some form of prominent warning that using gazelle_override will break downstream packages - at least in the documentation (e.g. here: https://github.com/bazel-contrib/bazel-gazelle/blob/99af6b381f814a11f2042c1324c016aa136ea31f/extensions.md) and maybe even as build warning.


Just FYI why I wanted to use an override:

I wanted to build api-linter (https://github.com/googleapis/api-linter), which requires bufbuild/protocompile (https://github.com/bufbuild/protocompile) which does things with well-known imports overriding some other imports (bufbuild/protocompile#310) and results in me getting errors like

link: package conflict error: github.com/bufbuild/protocompile: package imports google.golang.org/protobuf/types/pluginpb
          was compiled with: @@gazelle++go_deps+com_github_bufbuild_protocompile//wellknownimports/google/protobuf/compiler:pluginpb
        but was linked with: @@gazelle++go_deps+org_golang_google_protobuf//types/pluginpb:pluginpb
See https://github.com/bazelbuild/rules_go/issues/1877.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant