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

cmd/go: vendor ignored in package foo_test files #11628

Closed
chai2010 opened this issue Jul 8, 2015 · 1 comment
Closed

cmd/go: vendor ignored in package foo_test files #11628

chai2010 opened this issue Jul 8, 2015 · 1 comment
Milestone

Comments

@chai2010
Copy link
Contributor

chai2010 commented Jul 8, 2015

go version
go version devel +b6ead9f Tue Jul 7 21:53:11 2015 +0000 windows/amd64

cd mydev/myapp/vendor/gopkg.in/mgo.v2
go list -json
{
    "Dir": "C:\\go\\gopkg\\src\\mydev\\myapp\\vendor\\gopkg.in\\mgo.v2",
    "ImportPath": "mydev/myapp/vendor/gopkg.in/mgo.v2",
    "Name": "mgo",
    "Doc": "Package mgo offers a rich MongoDB driver for Go.",
    "Target": "C:\\go\\gopkg\\pkg\\windows_amd64\\mydev\\myapp\\vendor\\gopkg.in\\mgo.v2.a",
    "Stale": true,
    "Root": "C:\\go\\gopkg",
    "GoFiles": [
        "auth.go",
        "bulk.go",
        "cluster.go",
        "doc.go",
        "gridfs.go",
        "log.go",
        "queue.go",
        "raceoff.go",
        "saslstub.go",
        "server.go",
        "session.go",
        "socket.go",
        "stats.go"
    ],
    "IgnoredGoFiles": [
        "raceon.go",
        "saslimpl.go",
        "syscall_test.go"
    ],
    "Imports": [
        "crypto/md5",
        "crypto/sha1",
        "encoding/hex",
        "errors",
        "fmt",
        "mydev/myapp/vendor/gopkg.in/mgo.v2/bson",
        "mydev/myapp/vendor/gopkg.in/mgo.v2/internal/scram",
        "hash",
        "io",
        "math",
        "net",
        "net/url",
        "os",
        "reflect",
        "sort",
        "strconv",
        "strings",
        "sync",
        "time"
    ],
    "Deps": [
        "bytes",
        "crypto",
        "crypto/hmac",
        "crypto/md5",
        "crypto/rand",
        "crypto/sha1",
        "crypto/subtle",
        "mydev/myapp/vendor/gopkg.in/mgo.v2/bson",
        "mydev/myapp/vendor/gopkg.in/mgo.v2/internal/scram",
        "encoding",
        "encoding/base64",
        "encoding/binary",
        "encoding/hex",
        "encoding/json",
        "errors",
        "fmt",
        "hash",
        "internal/singleflight",
        "internal/syscall/windows",
        "internal/syscall/windows/registry",
        "io",
        "math",
        "math/big",
        "math/rand",
        "net",
        "net/url",
        "os",
        "reflect",
        "runtime",
        "sort",
        "strconv",
        "strings",
        "sync",
        "sync/atomic",
        "syscall",
        "time",
        "unicode",
        "unicode/utf16",
        "unicode/utf8",
        "unsafe"
    ],
    "TestGoFiles": [
        "export_test.go",
        "queue_test.go"
    ],
    "TestImports": [
        "gopkg.in/check.v1",
        "time"
    ],
    "XTestGoFiles": [
        "auth_test.go",
        "bulk_test.go",
        "cluster_test.go",
        "gridfs_test.go",
        "session_test.go",
        "suite_test.go",
        "syscall_windows_test.go"
    ],
    "XTestImports": [
        "crypto/tls",
        "errors",
        "flag",
        "fmt",
        "gopkg.in/check.v1",
        "gopkg.in/mgo.v2",
        "gopkg.in/mgo.v2/bson",
        "io",
        "io/ioutil",
        "math",
        "net",
        "net/url",
        "os",
        "os/exec",
        "reflect",
        "runtime",
        "sort",
        "strconv",
        "strings",
        "sync",
        "testing",
        "time"
    ]
}

XTestImports still depends gopkg.in/mgo.v2.

@ianlancetaylor ianlancetaylor added this to the Go1.5 milestone Jul 9, 2015
@rsc rsc changed the title cmd/go: vendor can not work with go test cmd/go: vendor ignored in package foo_test files Jul 21, 2015
@gopherbot
Copy link

CL https://golang.org/cl/12488 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 5, 2016
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants