Skip to content

x/tools/gopls: DidModifyFiles: "non-abs file path %q" bug in port.matches #70603

@adonovan

Description

@adonovan
#!stacks
"bug.Reportf" && "cache.port.matches:+5"

Issue created by stacks.

func (p port) matches(path string, content []byte) bool {
	ctxt := build.Default // make a copy
	ctxt.UseAllFiles = false
	path = filepath.Clean(path)
	if !filepath.IsAbs(path) {
		bug.Reportf("non-abs file path %q", path)   // <---------
		return false // fail closed
	...

This stack NaAAKw was reported by telemetry:

golang.org/x/tools/gopls@v0.17.0-pre.2 go1.23.2 windows/amd64 vscode (2)

Dups: HAiIaQ TeKpaQ odV-aw TO9VqA 4ysk1A iieLfw qlIWfw p47elA sppjQA 1zt-Ww gNtsDQ

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/telemetry-wins

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions