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/cmd/gomvpkg: // import not changed #27134

Open
ldemailly opened this issue Aug 21, 2018 · 3 comments
Open

x/tools/cmd/gomvpkg: // import not changed #27134

ldemailly opened this issue Aug 21, 2018 · 3 comments
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@ldemailly
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.10.3

Does this issue reproduce with the latest release?

1.10.3 is the latest

What operating system and processor architecture are you using (go env)?

What did you do?

go get -u golang.org/x/tools/cmd/gomvpkg
gomvpkg -from istio.io/fortio -to fortio.org/fortio
# the fnet/network.go file has the other package changed but not itself (same for all files):
package fnet // import "istio.io/fortio/fnet"

import (
        "fmt"
        "io"
        "io/ioutil"
        "math/rand"
        "net"
        "os"
        "strconv"
        "strings"
        "sync"

        "fortio.org/fortio/log"
        "fortio.org/fortio/version"
)

What did you expect to see?

The import comment to be change to be the new location

What did you see instead?

No change on the // import

@gopherbot gopherbot added this to the Unreleased milestone Aug 21, 2018
@ldemailly
Copy link
Author

another unrelated bug is that it changed package main to package fortio at the top level go file

@dmitshur dmitshur changed the title x/tools/cmd/gomvpkg // import not changed x/tools/cmd/gomvpkg: // import not changed Aug 21, 2018
@dmitshur
Copy link
Contributor

dmitshur commented Aug 21, 2018

Did you test the latest version of gomvpkg? I see some code there to update import path comments:

https://github.com/golang/tools/blob/5fad05c8188830251/refactor/rename/mvpkg.go#L247-L262

It seems it was implemented in golang/tools@13be4df for issue #10508.

@ldemailly
Copy link
Author

ldemailly commented Aug 21, 2018

I see indeed there is https://github.com/golang/tools/blame/master/refactor/rename/mvpkg.go#L253 from 3 years ago
but I did use go get -u as in the description/repro in order to get the latest gomvpkg and it didn't change those lines, not sure why
(is it related to the package being a child of the one given as argument?)

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants