-
-
Notifications
You must be signed in to change notification settings - Fork 679
Closed
Description
It seems that running ginkgo generate
inside a go module, as per go 1.11, somewhere outside GOPATH
results in a broken test skeleton.
Example:
package something_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "UNKNOWN_PACKAGE_PATH"
)
var _ = Describe("Something", func() {
})
The problem likely stems from the usage of ImportDir
which does not work with go modules:
ginkgo/ginkgo/bootstrap_command.go
Line 106 in 000d317
pkg, err := build.ImportDir(path, 0) |
This has been described here:
golang/go#26504
A workaround is to use the golang.org/x/tools/go/packages package, however it is not stable yet.
BrandonZacharie, alex-slynko, jspawar and normful
Metadata
Metadata
Assignees
Labels
No labels