Skip to content

Enhance support for go get inside the plugin #2053

@dlsniper

Description

@dlsniper

In order for the plugin to properly download all the dependencies of a package, it should execute the go get update with something like this go get <package-name>/... which will traverse the whole package after downloading and get the dependencies.

Also, it could be useful to add the -t switch to go get so that the test dependencies are also downloaded.

go get has a -v switch which allows it to display what happens when it's downloading the package. For example:

go get -v -u github.com/koding/kite/...
github.com/koding/kite (download)
github.com/cenkalti/backoff (download)
github.com/dgrijalva/jwt-go (download)
github.com/gorilla/mux (download)
github.com/gorilla/context (download)
github.com/gorilla/websocket (download)
# cd /home/florin/golang/src/github.com/gorilla/websocket; git pull --ff-only
error: Your local changes to the following files would be overwritten by merge:
        examples/chat/conn.go
Please, commit your changes or stash them before you can merge.
Aborting
Updating ab5b3a6..361d4c0
package github.com/gorilla/websocket: exit status 1
github.com/juju/ratelimit (download)
github.com/koding/cache (download)
github.com/mitchellh/mapstructure (download)
github.com/koding/logging (download)
github.com/satori/go.uuid (download)
Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh/terminal?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh/terminal": found meta tag main.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh/terminal?go-get=1
get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
Fetching https://gopkg.in/igm/sockjs-go.v2/sockjs?go-get=1
Parsing meta tags from https://gopkg.in/igm/sockjs-go.v2/sockjs?go-get=1 (status code 200)
get "gopkg.in/igm/sockjs-go.v2/sockjs": found meta tag main.metaImport{Prefix:"gopkg.in/igm/sockjs-go.v2", VCS:"git", RepoRoot:"https://gopkg.in/igm/sockjs-go.v2"} at https://gopkg.in/igm/sockjs-go.v2/sockjs?go-get=1
get "gopkg.in/igm/sockjs-go.v2/sockjs": verifying non-authoritative meta tag
Fetching https://gopkg.in/igm/sockjs-go.v2?go-get=1
Parsing meta tags from https://gopkg.in/igm/sockjs-go.v2?go-get=1 (status code 200)
gopkg.in/igm/sockjs-go.v2 (download)
github.com/mitchellh/cli (download)
github.com/coreos/go-etcd (download)
github.com/ugorji/go (download)
github.com/hashicorp/go-version (download)
github.com/koding/multiconfig (download)
github.com/BurntSushi/toml (download)
github.com/fatih/camelcase (download)
github.com/fatih/structs (download)
github.com/lann/squirrel (download)
github.com/lann/builder (download)
github.com/lann/ps (download)
github.com/lib/pq (download)
github.com/koding/websocketproxy (download)

I wonder if the plugin could use that to display the name of the downloaded packages while running the quickfix.

Finally, should the plugin provide a way to run go get -u on a package to update it

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions