Skip to content

x/tools/gopls: rename package decl fails in CLI #69582

@adonovan

Description

@adonovan

The rename package feature appears not to be working either in the CLI nor in Emacs+eglot:

xtools$ cat a/a.go 
package a

xtools$ gopls rename -diff ./a/a.go:#9 b
--- /Users/adonovan/w/xtools/a/a.go.orig
+++ /Users/adonovan/w/xtools/a/a.go
@@ -1 +1 @@
-package a
+package b
gopls: getFile: file:///Users/adonovan/w/xtools/a: read /Users/adonovan/w/xtools/a: is a directory

xtools$ echo $?
2

It is working from VS Code though.

Also, it is undocumented. I've split this out as #69624.

Metadata

Metadata

Assignees

Labels

DocumentationIssues describing a change to documentation.RefactoringIssues related to refactoring toolsgoplsIssues related to the Go language server, gopls.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions