tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 455 forks source link

'master' branch cannot save dependencies correctly #485

Open FlyingShit-XinHuang opened 8 years ago

FlyingShit-XinHuang commented 8 years ago

Expected behavior

go get github.com/tools/godep

error happens when building with 'vendor/':

vendor/golang.org/x/crypto/ssh/kex.go:17:2: cannot find package "golang.org/x/crypto/curve25519" in any of:
    /vagrant/tenxcloud/shared_core/admin/code/src/tenx-admin-private/vendor/golang.org/x/crypto/curve25519 (vendor tree)
...

I must go to godep directory and checkout to 'v74', then execute 'go install'. There should be some notes in README.md to guide users.

Steps to reproduce behavior

$ godep version
godep v74 (linux/amd64/go1.6)

go version output

$ go version
go version go1.6 linux/amd64

Contents of Godeps.json file

There is no 'golang.org/x/crypto/curve25519', only 'golang.org/x/crypto/ssh'

...
        {
            "ImportPath": "github.com/ugorji/go/codec",
            "Rev": "a396ed22fc049df733440d90efe17475e3929ccb"
        },
        {
            "ImportPath": "golang.org/x/crypto/ssh",
            "Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
        },
        {
            "ImportPath": "golang.org/x/net/context",
            "Rev": "4876518f9e71663000c348837735820161a42df7"
        },
...
freeformz commented 8 years ago

I can't duplicate this.

$ mkdir -p $GOPATH/src/github.com/freeformz/t485
$ cd $GOPATH/src/github.com/freeformz/t485
$ echo 'package main

import (
        "fmt"

        "golang.org/x/crypto/ssh"
)

func main() {
        fmt.Println(ssh.Permissions{})
}' > main.go
$ godep save
$ cat Godeps/Godeps.json
{
    "ImportPath": "github.com/freeformz/t485",
    "GoVersion": "go1.7",
    "GodepVersion": "v74",
    "Deps": [
        {
            "ImportPath": "golang.org/x/crypto/curve25519",
            "Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
        },
        {
            "ImportPath": "golang.org/x/crypto/ssh",
            "Rev": "c197bcf24cde29d3f73c7b4ac6fd41f4384e8af6"
        }
    ]
}
$ find vendor
vendor
vendor/golang.org
vendor/golang.org/x
vendor/golang.org/x/crypto
vendor/golang.org/x/crypto/curve25519
vendor/golang.org/x/crypto/curve25519/const_amd64.s
vendor/golang.org/x/crypto/curve25519/cswap_amd64.s
vendor/golang.org/x/crypto/curve25519/curve25519.go
vendor/golang.org/x/crypto/curve25519/doc.go
vendor/golang.org/x/crypto/curve25519/freeze_amd64.s
vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s
vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go
vendor/golang.org/x/crypto/curve25519/mul_amd64.s
vendor/golang.org/x/crypto/curve25519/square_amd64.s
vendor/golang.org/x/crypto/LICENSE
vendor/golang.org/x/crypto/PATENTS
vendor/golang.org/x/crypto/ssh
vendor/golang.org/x/crypto/ssh/buffer.go
vendor/golang.org/x/crypto/ssh/certs.go
vendor/golang.org/x/crypto/ssh/channel.go
vendor/golang.org/x/crypto/ssh/cipher.go
vendor/golang.org/x/crypto/ssh/client.go
vendor/golang.org/x/crypto/ssh/client_auth.go
vendor/golang.org/x/crypto/ssh/common.go
vendor/golang.org/x/crypto/ssh/connection.go
vendor/golang.org/x/crypto/ssh/doc.go
vendor/golang.org/x/crypto/ssh/handshake.go
vendor/golang.org/x/crypto/ssh/kex.go
vendor/golang.org/x/crypto/ssh/keys.go
vendor/golang.org/x/crypto/ssh/mac.go
vendor/golang.org/x/crypto/ssh/messages.go
vendor/golang.org/x/crypto/ssh/mux.go
vendor/golang.org/x/crypto/ssh/server.go
vendor/golang.org/x/crypto/ssh/session.go
vendor/golang.org/x/crypto/ssh/tcpip.go
vendor/golang.org/x/crypto/ssh/transport.go

If you can reliably reproduce locally, please add -v -d to you commands, save the output and upload it somewhere I can inspect it.

FlyingShit-XinHuang commented 8 years ago

You can get the output from http://pan.baidu.com/s/1hsnV7tM