shurcooL / Go-Package-Store

An app that displays updates for the Go packages in your GOPATH.
MIT License
899 stars 29 forks source link

Missing "package" #27

Closed sethwklein closed 9 years ago

sethwklein commented 9 years ago
$ go get -u github.com/shurcooL/Go-Package-Store
package github.com/shurcooL/Go-Package-Store
    imports azul3d.org/semver.v1
    imports github.com/google/go-github/github
    imports github.com/google/go-querystring/query
    imports github.com/shurcooL/Go-Package-Store/presenter
    imports github.com/shurcooL/go/exp/12
    imports github.com/shurcooL/go/exp/13
    imports github.com/shurcooL/go/gists/gist5258650
    imports github.com/shurcooL/go/gists/gist5892738
    imports github.com/shurcooL/go/gists/gist7802150
    imports github.com/shurcooL/go/vcs
    imports github.com/shurcooL/go/gists/gist5504644
    imports github.com/shurcooL/go/gists/gist7480523
    imports github.com/shurcooL/go/gists/gist7519227
    imports github.com/shurcooL/go/gists/gist7519227
    imports github.com/shurcooL/go/gists/gist7519227: cannot find package "github.com/shurcooL/go/gists/gist7519227" in any of:
    /usr/local/go/src/pkg/github.com/shurcooL/go/gists/gist7519227 (from $GOROOT)
    /Users/sk/mirror/go/src/github.com/shurcooL/go/gists/gist7519227 (from $GOPATH)
    /Users/sk/go/src/github.com/shurcooL/go/gists/gist7519227
$ 

On a stylistic note, "gist7519227" is a rather meaningless name for a package, and that huge list of external gist "packages" creates exactly the brittleness seen here.

dmitshur commented 9 years ago

Hi, please try the go get -u github.com/shurcooL/Go-Package-Store command again, it should work.

I think it's a bug in go get -u where if package import paths change at the same time as packages are removed, it reports a problem incorrectly. I'll try to get it reported and fixed if so.

On a stylistic note, "gist7519227" is a rather meaningless name for a package, and that huge list of external gist "packages" creates exactly the brittleness seen here.

I agree about the name being poor, and I've been working on improving that, which is precisely why this happened. So it would actually be fine if I hadn't done anything. But I think it's worth improving the package names. You can see https://github.com/shurcooL/go/commit/a9d7bb9c74cca1523ae77729446478915c68e480 where I refactored and removed many of those low quality packages. Go Package Store still works after the refactor, so this is just a minor go get -u issue.

Let me know if running go get -u a second time does not fix it.

dmitshur commented 9 years ago

Also, the Travis build is passing, suggesting that it should work fine.

andrewslotin commented 9 years ago

Hi!

I just tried to update my Go-Package-Store and got the same issue as @sethwklein, plus a similar error about github.com/shurcooL/go/gists/gist5286084 and I can confirm that retry helps. I assume that the problem is in $GOPATH/pkg/.../github.com/shurcooL/Go-Package-Store/presenter.a that left from a previous installation.

sethwklein commented 9 years ago

I retried now and it worked.

dmitshur commented 9 years ago

Thanks for confirming.

I will try to make a smaller reproducible case and submit/find a bug report for this go get issue and try to get it fixed. I plan to do more refactoring and package renaming, and I don't want it to keep happening for users.

dmitshur commented 9 years ago

By the way, @sethwklein, is there a reason you didn't use Go Package Store to update Go Package Store?

sethwklein commented 9 years ago

@shurcooL yes, I encountered the error while attempting to install Go Package Store.

dmitshur commented 9 years ago

I will try to make a smaller reproducible case and submit/find a bug report for this go get issue and try to get it fixed. I plan to do more refactoring and package renaming, and I don't want it to keep happening for users.

I've done so in https://github.com/golang/go/issues/9224.