-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
nogo is very noisy in 0.50.0 #4080
Comments
I didn't intentionally change anything non-trivial about what the actual nogo binary does, so I'm a bit surprised to see this. Are you that it didn't happen with 0.49.0? Could you perhaps run a bisect? |
Right, yes, I should have done that 😄 Took a moment, bisect gave me several different answers until I added This makes sense: the validation and compilation actions now happen in parallel. This is what caused my bisect to be unstable, but also causes the validation errors to sometimes be reported before the compilation fails. I guess that adding the compilation as a dependency of the validation defeats the point of your change, so I guess the fix here could be to reduce the output length of nogo if the input file doesn't pass basic validation? |
The nogo action depends on the compilation action if and only if the compile action isn't pure, so that's probably why you are seeing this issue in some cases but not others. I think that we should just skip all analyzers if type-checking fails. |
@fmeum Looks good!
|
**What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** Previously, it was printed once by analyzer. **Which issues(s) does this PR fix?** Fixes #4080 **Other notes for review**
**What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** Previously, it was printed once by analyzer. **Which issues(s) does this PR fix?** Fixes #4080 **Other notes for review**
What version of rules_go/gazelle/Bazel are you using?
rules_go 0.50.0, gazelle 0.38.0, Bazel 7.3.1, Go 1.23.0
What did you do?
I wrote some Go code that doesn't compile, and then I tried to build it with
bazel build //...
What did you expect to see?
An error message
What did you see instead?
28 error messages.
Each nogo analyzer is individually reporting on the compilation failure. For example:
... repeated for every nogo analyzer.
I can't seem to reproduce this with every compilation failure, which is interesting. The line that manages to trigger this is
s3.NewFromConfig(b.awsConfig)
fromjackfan.us.kg/aws/aws-sdk-go-v2/service/s3
, whereb.awsConfig
is a pointer instead of a struct.The text was updated successfully, but these errors were encountered: