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

Issue with GO111MODULE=on #47

Open
davedbase opened this issue May 18, 2019 · 7 comments
Open

Issue with GO111MODULE=on #47

davedbase opened this issue May 18, 2019 · 7 comments

Comments

@davedbase
Copy link

I'm having some trouble with enabling GO111MODULE=on. I was able to go through the whole process of setting up the repository and building V8 from scratch. When I run go test I get the following result:

PASS
ok  	github.com/augustoroman/v8	9.433s

I installed the package at $GOPATH/src/github.com/augustoroman/v8. Everything seems to work well on OS X so far. However when I attempt importing with import "github.com/augustoroman/v8" in my own separate project I got a complaint. Remembering back I realized that I have GO111MODULE=on enabled. This prompted me to add a go.mod with the following in the root of the v8 folder:

module github.com/augustoroman/v8
go 1.12

When I attempt running I get another error:

go: finding github.com/augustoroman/v8 latest
go: downloading github.com/augustoroman/v8 v8.0.0-20190418063024-4b66934a28a7
main.go:3:8: unknown import path "github.com/augustoroman/v8": cannot find module providing package github.com/augustoroman/v8

Any suggestions on how to resolve this issue?

@dkushner
Copy link

Yeah, this issue is discussed here: golang/go#28435. I am also having this problem. It appears that the Go package resolver interprets the repository name as a major release branch because it starts with v. Have not found a satisfactory resolution to this, and I've gone as far as forking all relevant repositories to rename them.

@davedbase
Copy link
Author

So aside from being a total blocker rn until it's patched I suppose the only real way to handle this is change GO111MODULE to off? I'm honestly blown away that this is an issue. Wow.

@olegsu
Copy link

olegsu commented Jun 11, 2019

@ddibiase any news on it?

@joesonw
Copy link

joesonw commented Oct 19, 2019

@olegsu I forked this one and include precompiled 6.3 with it. https://github.com/joesonw/js8 . Now you can directly go get github.com/joesonw/js8 without any other steps. And it works with bazel

@ConradIrwin
Copy link

@joesonw Thanks for that! Unfortunately it still doesn't work for me:

 go: finding github.com/augustoroman/v8 latest
github.com/superhuman/backend/lib/js imports
	github.com/joesonw/js8 tested by
	github.com/joesonw/js8.test imports
	github.com/augustoroman/v8: no matching versions for query "latest"

@joesonw
Copy link

joesonw commented Oct 20, 2019

@ConradIrwin ts seems like that this was a cached old version. Do you happen to use GOPROXY? Can you try go get github.com/joesonw/js8@6.3.292.48.1-bazel-2019-10-19-16-00 which is the true latest version.

@ConradIrwin
Copy link

@joesonw thanks, specifying 'github.com/joesonw/js8 6.3.292.48.1-bazel-2019-10-19-16-00' in my go.mod fixed it. I don't use a GOPROXY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants