Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: rename: spurious pkgname conflict in xtest #67069

Open
adonovan opened this issue Apr 26, 2024 · 0 comments
Open

x/tools/gopls: rename: spurious pkgname conflict in xtest #67069

adonovan opened this issue Apr 26, 2024 · 0 comments
Labels
gopls Issues related to the Go language server, gopls. Refactoring Issues related to refactoring tools
Milestone

Comments

@adonovan
Copy link
Member

The renamer reports a conflict where there would be none, when renaming AA in the program below to aa:

xtools$ pwd
/Users/adonovan/w/xtools

xtools$ cat aa/aa.go 
package aa

var AA int // renaming this var "AA" to "aa" would conflict...

const C = 0

xtools$ cat aa/aa_test.go 
package aa_test

import "golang.org/x/tools/aa" // ...with this imported package name

var _ = aa.C

xtools$ gopls rename ./aa/aa.go:#17 aa     # rename AA to aa
gopls: aa/aa.go:3:5: renaming this var "AA" to "aa" would conflict
aa/aa_test.go:3:8:	with this imported package name
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Apr 26, 2024
@gopherbot gopherbot added this to the Unreleased milestone Apr 26, 2024
@adonovan adonovan added Refactoring Issues related to refactoring tools gopls Issues related to the Go language server, gopls. and removed gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Apr 26, 2024
@hyangah hyangah modified the milestones: Unreleased, Backlog Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Refactoring Issues related to refactoring tools
Projects
None yet
Development

No branches or pull requests

3 participants