golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.72k stars 17.62k forks source link

x/tools/gopls: "edit does not belong to syntax of package %q" bug in golang.Rename #70049

Open adonovan opened 7 hours ago

adonovan commented 7 hours ago
#!stacks
"bug.Reportf" && "golang.(*renamer).update:+45"

Issue created by stacks.

        pgf, ok := enclosingFile(r.pkg, item.node.Pos())
        if !ok {
            bug.Reportf("edit does not belong to syntax of package %q", r.pkg)
            continue
        }

This stack 4VHVlA was reported by telemetry:

gabyhelp commented 7 hours ago

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)