Skip to content

x/tools/gopls: DidOpen (et al?) fail to reject non-absolute path from client early, triggering assertion failure #70603

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 8sXekg jAHnFg DwqO8Q Ec_jOw 2F1_QQ V3SuDg

Metadata

Metadata

Assignees

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

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions