Move Go package refactoring does not trigger reference updates
Hello,
I was attempting to refactor a few files and move them from package to the other. When I tried to use the `Refactor/Move` I noticed the references never updated, similar to how it does during a rename.
I see several previous posts mentioning the similar thing for some of the other IDEs but non for GoLand, am I doing something wrong?
Here are my current build versions. I have not updated to the 2018 version since Cmd+Z after move triggers and error, not allowing me to undo my changes.
GoLand 2017.3.4
Build #GO-173.4674.50, built on April 6, 2018
JRE: 1.8.0_152-release-1024-b15 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
请先登录再写评论。
Hi Mahirk,
Please provide code sample and steps to recreate the issue.
Could you also describe the problems with Cmd+Z in 2018.1.*? We're not aware of any problems with this.
Sure thanks Alex,
We have two files in a package:
common:
client.go, types.go
types.go
```
package common
const (
ExportedValue123 = "100"
)
```
client.go
```
package common
func PrintExportedValue() {
fmt.Printf("The current exported value is %s", ExportedValue123)
}
```
Now if we want to change it so that the structure looks like
common:
client.go
types:
types.go
types.go changes successfully
```
package types
const (
ExportedValue123 = "100"
)
```
client.go does nit change to import types and instead fails to build
```
package common
func PrintExportedValue() {
fmt.Printf("The current exported value is %s", ExportedValue123)
}
```
Thanks for the update. Indeed, it's not implemented yet. We implemented moving separate symbols in 2018.2 and going to implement entire file moving in 2018.3, please stay tuned. You can see the progress here: https://youtrack.jetbrains.com/issue/GO-3341