Skip to content

x/tools/gopls: "finding best view for change" bug.Report in Session.DidModifyFiles (via telemetry) #67144

@adonovan

Description

@adonovan

This stack 4cQxvQ was reported by telemetry:

DidModifyFiles:+138 is:

		v, err := s.viewOfLocked(ctx, mod.URI)
		if err != nil {
			// bestViewForURI only returns an error in the event of context
			// cancellation. Since state changes should occur on an uncancellable
			// context, an error here is a bug.
			bug.Reportf("finding best view for change: %v", err)
			continue
		}
gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.(*Session).DidModifyFiles:+138
golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles:+36
golang.org/x/tools/gopls/internal/server.(*server).DidSave:+11
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+261
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3
runtime.goexit:+0
golang.org/x/tools/gopls@v0.15.3 go1.22.2 darwin/arm64 neovim (2)

Issue created by golang.org/x/tools/gopls/internal/telemetry/cmd/stacks.

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsInvestigationSomeone 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

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions