-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/tools/gopls: "file not found for pos = %d (%s)" crash in go/types #69338
Labels
gopls/telemetry-wins
gopls
Issues related to the Go language server, gopls.
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
Comments
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
This stack
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks. |
Change https://go.dev/cl/613735 mentions this issue: |
mateusz834
pushed a commit
to mateusz834/tgoast
that referenced
this issue
Mar 14, 2025
Previously, the Checker.allowVersion method would use a token.Pos to try to infer which file of the current package the checker was "in". This proved fragile when type-checking syntax that had been modified or synthesized and whose positions were invalid. This change records the effective version in the checker state (checker.environment.version). Just like other aspects of the environment, the version changes from one file to the next and must be saved and restored with each check.later closure. Similarly, declInfo captures and temporarily reinstates the effective version when checking each object. + Test of position independence in go/types and types2 + Test of panic avoidance in go/types Fixes golang/go#69477 Fixes golang/go#69338 Change-Id: Ic06f9d88151c64a4f7848f8942d08e3c312cdd6f Reviewed-on: https://go-review.googlesource.com/c/go/+/613735 Reviewed-by: Robert Griesemer <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
gopls/telemetry-wins
gopls
Issues related to the Go language server, gopls.
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.
This stack
vD1W8g
was reported by telemetry:The root cause is #69477 in go/types.
Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.
Dups: vEHlHQ rRko4w ipCG3g X0G-gQ YALHSA NQ7Z2w kShApw
The text was updated successfully, but these errors were encountered: