Vendoring test deps fails when using external test package
ivy opened this issue · 0 comments
ivy commented
Using this repo as an example, executing manul -I -t
results in no dependencies being installed:
2018-02-01 22:17:41 [INFO]: all dependencies already vendored
I suspect this is because of the use of an external package for tests which uses the key XTestImports
instead of TestImports
in the output of go list -e -json github.com/ivy/manul-test-deps-bug
:
{
"Dir": "/Users/ivy/src/github.com/ivy/manul-test-deps-bug",
"ImportPath": "github.com/ivy/manul-test-deps-bug",
"Name": "main",
"Target": "/Users/ivy/bin/manul-test-deps-bug",
"Stale": true,
"StaleReason": "cannot stat install target",
"Root": "/Users/ivy",
"GoFiles": [
"main.go"
],
"Imports": [
"fmt"
],
"Deps": [
"errors",
"fmt",
"internal/cpu",
"internal/poll",
"internal/race",
"io",
"math",
"os",
"reflect",
"runtime",
"runtime/internal/atomic",
"runtime/internal/sys",
"strconv",
"sync",
"sync/atomic",
"syscall",
"time",
"unicode",
"unicode/utf8",
"unsafe"
],
"XTestGoFiles": [
"main_test.go"
],
"XTestImports": [
"github.com/stretchr/testify/assert",
"testing"
]
}