Skip to content

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

Open
@adonovan

Description

@adonovan

Activity

added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
goplsIssues related to the Go language server, gopls.
ToolsThis label describes issues relating to any tools in the x/tools repository.
on Nov 27, 2024
added this to the Unreleased milestone on Nov 27, 2024
adonovan

adonovan commented on Nov 27, 2024

@adonovan
MemberAuthor

This implies that session.DidModifyFiles was passed a list of modifications that include relative paths. This is most likely because DidOpen (among others) was passed a relative path that it should have either rejected or absolutized.

findleyr

findleyr commented on Nov 27, 2024

@findleyr
Member

Agreed. The bug is not that the client sent bad paths, but that they weren't rejected earlier.

I feel like there's a whole category of bad inputs that gopls could do a better job of catching and handling. In this case, there's no good way to reject a bad notification, so gopls needs raise a message or diagnostic (or both) alerting the user that their client is misbehaving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @adonovan@gopherbot@findleyr@gabyhelp

        Issue actions

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