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

same directory and different package protos are not handled properly by gazelle #1239

Open
aaomidi opened this issue Apr 18, 2022 · 1 comment

Comments

@aaomidi
Copy link

aaomidi commented Apr 18, 2022

What version of gazelle are you using? 0.25.0

What version of rules_go are you using? 0.31.0

What version of Bazel are you using? 5.1.0

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

Linux AMD64

What did you do?

Proof of concept repo: https://github.com/aaomidi/gazelle-proto-poc

Create two proto files, in the same directory, with different packages. Depend from one proto file to another. Run gazelle fix .. It will not add the deps value. If I manually add the correct deps value, the protos build fine. However, if I run gazelle fix again, it will remove that line.

What did you expect to see?

Either handle the same directory-different package situation, or give an error/warning that protos in the same directory can't have different packages.

What did you see instead?

Either silently fails, or removes the deps file and breaks the BUILD file.

@nickgooding
Copy link
Contributor

This sounds like it could be caused by the same problem as #1219. Could you see if your issue is fixed by patching the v0.25.0 release with a cherry-pick of 0408bc8?

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

2 participants