-
Notifications
You must be signed in to change notification settings - Fork 21
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
Update to support Go 1.11 modules #8
Comments
Can you provide a reproducible example on which to run? |
@BurntSushi Here. There's something weird going on. If I use a $ GOPATH=$HOME/.go ./run.sh
+ export GO111MODULE=on
+ GO111MODULE=on
+ go mod download
+ go build -o st .
+ go-sumtype .
/Users/alex/.go/pkg/mod/golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f/semaphore/semaphore.go:15:2: could not import golang.org/x/net/context (cannot find package "golang.org/x/net/context" in any of:
/usr/local/opt/go/libexec/src/golang.org/x/net/context (from $GOROOT)
/Users/alex/.go/src/golang.org/x/net/context (from $GOPATH))
couldn't load packages due to errors: golang.org/x/sync/semaphore But if I put the $ GOPATH=$PWD/.go ./run.sh
+ export GO111MODULE=on
+ GO111MODULE=on
+ go mod download
+ go build -o st .
+ go-sumtype . The problem appears to be with transitive dependencies. It can resolve the direct dependencies, but not the transitive ones. (Hence my test case uses I've tried wiping my
|
This commt is the first step towards switching to Go modules, ref: BurntSushi#8
This commit adds Go modules support by switching to the new package that supports them in the golang tools repository. Closes BurntSushi#8
This commt is the first step towards switching to Go modules, ref: #8
This commit adds Go modules support by switching to the new package that supports them in the golang tools repository. Closes #8
go-sumtype seems to fail with "could not import" errors, even (surprisingly) after
go mod vendor
. From what I can tell, it needs to be updated to understand Go modules.The text was updated successfully, but these errors were encountered: