Closed suhaibmujahid closed 5 years ago
Thank you for the patch @SuhaibMujahid! What do you think about changing it as in https://github.com/src-d/enry/pull/211#discussion_r271303916 ?
Thank you @bzz for consideration.
I tried it but it didn't work:
go get gopkg.in/src-d/enry.v1/cmd/enry: invalid module path "gopkg.in/src-d/enry.v1/cmd/enry"
I'm trying to use enry
as a dependency in my application and the modification that I proposed worked for me.
Have a good day :)
I tried it but it didn't work:
go get gopkg.in/src-d/enry.v1/cmd/enry: invalid module path "gopkg.in/src-d/enry.v1/cmd/enry"
I'm trying to use
enry
as a dependency in my application and the modification that I proposed worked for me.
Hmm, that error surprises me. What version of Go are you currently building with (go version
)?
I'm using go1.11.5 darwin/amd64
with versioned modules.
Thanks. I am unfortunately having some trouble reproducing this issue right now. Here's what I tried—if you run this locally does it work?
# Acquire Go 1.11.5
go get golang.org/dl/go1.11.5
go1.11.5 download
# …
go1.11.5 clean -modcache
# First, let's try it without modules.
rm $GOPATH/bin/enry
env -u GO111MODULE go1.11.5 get gopkg.in/src-d/enry.v1/cmd/enry
# works OK
enry -version
# undefined (OK)
# Now let's try it with modules enabled.
rm $GOPATH/bin/enry
mkdir testing ; cd testing ; go mod init testing
env GO111MODULE=on go1.11.5 get gopkg.in/src-d/enry.v1/cmd/enry
enry -version
# undefined (OK)
After running clean -modcache
it worked.
go get gopkg.in/src-d/enry.v1/cmd/enry
# go: downloading gopkg.in/src-d/enry.v1 v1.7.2
# go: downloading gopkg.in/toqueteos/substring.v1 v1.0.2
# go: downloading github.com/toqueteos/trie v1.0.0
enry -version
# undefined
Thank you.
Thanks. I suspect you might have had a broken module hash somewhere from an earlier 1.11 build (cf. https://github.com/golang/go/issues/27093).