Skip to content

x/tools/gopls: CLI cannot rename directories #68097

@adonovan

Description

@adonovan

In a clean x/tools repo, using tip go1.23 and tip gopls, in VS Code, rename package frob in gopls/internal/util/frob/frob.go
to "blorf" using this command:

xtools$ gopls rename -w ~/w/xtools/gopls/internal/util/frob/frob.go:#1151 blorf
gopls: getFile: file:///Users/adonovan/w/xtools/gopls/internal/util/frob: read /Users/adonovan/w/xtools/gopls/internal/util/frob: is a directory

The error appears to arise from a WorkspaceEdit containing a rename DocumentChange referring to a directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions