x/tools/go/analysis/passes/slog: nil panic in isAttr
via analysisutil.IsNamed
#61228
Labels
Analysis
Issues related to static analysis (vet, x/tools/go/analysis)
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The s3-upload-proxy package was using slog from golang.org/x/exp/slog, and I wanted to migrate it to the standard library one (see PR: fsouza/s3-upload-proxy#511). I ran into a weird issue when trying to run tests though, and since the error happens in a package that doesn't have any tests, I realized that the issue happened during compilation and tried to run
go test -c
to see what would happen, and voila, there's the error.I tried creating a smaller reproducer, but failed to do so. Unfortunately I don't have much time in my hands to try to dig into this issue, so I figured I could report it in case someone else has more time. It's possible that I'm doing something very wrong here, but even in that case, I'm not sure if getting a panic from the build process is the right thing to do?
Steps to reproduce from "scratch":
What did you expect to see?
Successful compilation of the test binary.
What did you see instead?
The text was updated successfully, but these errors were encountered: