glide
glide copied to clipboard
glide can't get subpackages, and set subpackages unable
First problem:
my command is glide get golang.org/x/sys/unix, and I set github mirror original: https://golang.org/x/sys/unix repo: https://github.com/golang/sys/unix. The result is Cannot detect CVS
When I set mirror
original: https://golang.org/x/sys/unix repo: https://github.com/golang/sys
But the result is copy all sys directories and files to sys/unix directory, it's wrong.
So I feel glide can't control the subpackakges.
Second problem:
my glide.yaml file like this:
package: github.com/smartystreets/goconvey subpackages: convey
but glide up will download all goconvey directories and files to project directory.

See the solution https://github.com/xkeyideal/glide
https://github.com/xkeyideal/glide This didn't work for me. I am stilling same VCS issue.
@subbu05 glide mirror set https://golang.org/x/sys/unix repo: https://github.com/golang/sys/unix --base github.com/golang/sys
@xkeyideal
依然失败,不管是映射到github还是我本地目录,mirrors.yaml文件中的都没起作用
~/.glide.mirrors.yaml repos:
- original: cloud.google.com/go repo: /home/ygt/gopath/src/cloud.google.com/go
- original: golang.org/x/crypto repo: github.com/golang/crypto vcs: git
- original: golang.org/x/net repo: github.com/golang/net
- original: golang.org/x/oauth2 repo: github.com/golang/oauth2 vcs: git
- original: golang.org/x/sys repo: github.com/golang/sys vcs: git
- original: golang.org/x/text repo: github.com/golang/text vcs: git
- original: google.golang.org/genproto repo: /home/ygt/gopath/src/google.golang.org/genproto
- original: google.golang.org/grpc repo: /home/ygt/gopath/src/google.golang.org/grpc
- original: https://golang.org/x/image repo: https://github.com/golang/image vcs: git
- original: https://golang.org/x/mobile repo: https://github.com/golang/mobile vcs: git
- original: https://golang.org/x/sys/unix repo: https://github.com/golang/sys/unix base: github.com/golang/sys
- original: https://golang.org/x/tools repo: https://github.com/golang/tools vcs: git
glide.yaml package: foo import:
- package: golang.org/x/sys
- package: google.golang.org/grpc
glide install 依然失败
root@ygt:/home/ygt/gopath/src/foo# glide install [INFO] Loading mirrors from mirrors.yaml file [INFO] Lock file (glide.lock) does not exist. Performing update. [INFO] Loading mirrors from mirrors.yaml file [INFO] Downloading dependencies. Please wait... [INFO] --> Fetching golang.org/x/sys [INFO] --> Fetching google.golang.org/grpc [WARN] Unable to checkout google.golang.org/grpc [ERROR] Update failed for google.golang.org/grpc: Cannot detect VCS [WARN] Unable to checkout golang.org/x/sys [ERROR] Update failed for golang.org/x/sys: Cannot detect VCS [ERROR] Failed to do initial checkout of config: Cannot detect VCS
root@ygt:/home/ygt/gopath/src/foo# glide --debug install [INFO] Loading mirrors from mirrors.yaml file [DEBUG] Found mirror: cloud.google.com/go to /home/ygt/gopath/src/cloud.google.com/go () [DEBUG] Found mirror: golang.org/x/crypto to github.com/golang/crypto (git) [DEBUG] Found mirror: golang.org/x/net to github.com/golang/net () [DEBUG] Found mirror: golang.org/x/oauth2 to github.com/golang/oauth2 (git) [DEBUG] Found mirror: golang.org/x/sys to github.com/golang/sys (git) [DEBUG] Found mirror: golang.org/x/text to github.com/golang/text (git) [DEBUG] Found mirror: google.golang.org/genproto to /home/ygt/gopath/src/google.golang.org/genproto () [DEBUG] Found mirror: google.golang.org/grpc to /home/ygt/gopath/src/google.golang.org/grpc () [DEBUG] Found mirror: https://golang.org/x/image to https://github.com/golang/image (git) [DEBUG] Found mirror: https://golang.org/x/mobile to https://github.com/golang/mobile (git) [DEBUG] Found mirror: https://golang.org/x/sys/unix to https://github.com/golang/sys/unix () [DEBUG] Found mirror: https://golang.org/x/tools to https://github.com/golang/tools (git) [INFO] Lock file (glide.lock) does not exist. Performing update. [INFO] Loading mirrors from mirrors.yaml file [DEBUG] Found mirror: cloud.google.com/go to /home/ygt/gopath/src/cloud.google.com/go () [DEBUG] Found mirror: golang.org/x/crypto to github.com/golang/crypto (git) [DEBUG] Found mirror: golang.org/x/net to github.com/golang/net () [DEBUG] Found mirror: golang.org/x/oauth2 to github.com/golang/oauth2 (git) [DEBUG] Found mirror: golang.org/x/sys to github.com/golang/sys (git) [DEBUG] Found mirror: golang.org/x/text to github.com/golang/text (git) [DEBUG] Found mirror: google.golang.org/genproto to /home/ygt/gopath/src/google.golang.org/genproto () [DEBUG] Found mirror: google.golang.org/grpc to /home/ygt/gopath/src/google.golang.org/grpc () [DEBUG] Found mirror: https://golang.org/x/image to https://github.com/golang/image (git) [DEBUG] Found mirror: https://golang.org/x/mobile to https://github.com/golang/mobile (git) [DEBUG] Found mirror: https://golang.org/x/sys/unix to https://github.com/golang/sys/unix () [DEBUG] Found mirror: https://golang.org/x/tools to https://github.com/golang/tools (git) [INFO] Downloading dependencies. Please wait... [DEBUG] Locking https-golang.org-x-sys [DEBUG] Setting up the cache directory [INFO] --> Fetching golang.org/x/sys [DEBUG] Locking https-google.golang.org-grpc [INFO] --> Fetching google.golang.org/grpc [WARN] Unable to checkout golang.org/x/sys [ERROR] Update failed for golang.org/x/sys: Cannot detect VCS [DEBUG] Unlocking https-golang.org-x-sys [WARN] Unable to checkout google.golang.org/grpc [ERROR] Update failed for google.golang.org/grpc: Cannot detect VCS [DEBUG] Unlocking https-google.golang.org-grpc [ERROR] Failed to do initial checkout of config: Cannot detect VCS Cannot detect VCS
root@ygt:/home/ygt/gopath/src/foo# glide mirror list [INFO] Mirrors... [INFO] --> cloud.google.com/go replaced by /home/ygt/gopath/src/cloud.google.com/go [INFO] --> golang.org/x/crypto replaced by github.com/golang/crypto (git) [INFO] --> golang.org/x/net replaced by github.com/golang/net [INFO] --> golang.org/x/oauth2 replaced by github.com/golang/oauth2 (git) [INFO] --> golang.org/x/sys replaced by github.com/golang/sys (git) [INFO] --> golang.org/x/text replaced by github.com/golang/text (git) [INFO] --> google.golang.org/genproto replaced by /home/ygt/gopath/src/google.golang.org/genproto [INFO] --> google.golang.org/grpc replaced by /home/ygt/gopath/src/google.golang.org/grpc [INFO] --> https://golang.org/x/image replaced by https://github.com/golang/image (git) [INFO] --> https://golang.org/x/mobile replaced by https://github.com/golang/mobile (git) [INFO] --> https://golang.org/x/sys/unix replaced by https://github.com/golang/sys/unix, base: github.com/golang/sys [INFO] --> https://golang.org/x/tools replaced by https://github.com/golang/tools (git) root@ygt:/home/ygt/gopath/src/foo#
你使用的是我修改后的glide么?
sys/unix这个子包在我的项目中也使用过,按照我给出的做法,我本地是没有问题的。
另,建议你使用dep吧,我已经转dep了
@lurenjia528