-
Notifications
You must be signed in to change notification settings - Fork 24
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
error trying to use mod upgrade
#3
Comments
@msawangwan thanks for opening the issue.
Curious to know any more information you can give me that led to this error. Thanks! |
hi @marwan-at-work thanks for your reply. this must be user-error, as i get that same output (and no upgrade) when running any ideas? i did a |
@msawangwan the only dependency this command has is on golang.org/x/tools/go/package so maybe it's building with an incompatible version of it. Can you try the following from outside of GOPATH:
Then try again (making sure you're using the just installed binary). |
OK so i did as you said but not sure where the binary is saved to -- didn't see one in the cloned am i using the correct binary? does the error in the screenshot mean anything that you can make sense of? thanks. |
actually.. that output isn't an error, is it? i see that the |
@msawangwan hmm, yep so those logs are coming from the dependency I mentioned above. I believe a newer pseudo version suppresses those logs so it might be nice to update its version in my go.mod file. And yes you are using the correct binary ($GOPATH/bin). Lastly, this seems like the error is gone, were the paths properly upgraded in all the PS. you can do |
OK so.. i spoke too soon. although the |
ah you know what.. i see the issue.
but the imports still point to the original repo:
so.. does this mean i would have to update all the imports by hand (by hand, i mean.. |
@msawangwan that's a good point, I can potentially add a |
@marwan-at-work if there isn't a tool for re-writing imports already, that would be pretty useful. if i had a few extra minutes, i wouldn't mind submitting a pr for it. regardless, thanks again for the help. |
@msawangwan you're very welcome to, it shouldn't be difficult by looking at how |
@marwan-at-work cool, i'll give it a look and let you know. |
hi @marwan-at-work i've created a branch and tried to submit a PR but got permission denied. how should i submit this? |
@msawangwan you need to fork the repo and push the branch to your own fork |
Hi @marwan-at-work - just FYI, I'm seeing this on https://github.com/google/go-github too, attempting to upgrade from v19 to v20: $ mod upgrade
<html><head></head><body><p><em>Error:</em> Your request has found no candidate provider [hs="(null)", id="(null)"]</p></body></html> No big deal, I'll just update manually... Just wanted to let you know since you have contributed to this repo and it can make a cool and easy test case for you. 😄 |
@gmlewis make sure you build this tool with |
I've added a comment to include this flag in the readme, closing this issue. But please let me know if the issue still persisted after building with the correct flag. |
Hmmm... I had originally installed this command without So now, I just tried this: $ pushd ~/go/src/github.com/marwan-at-work/mod/cmd/mod
$ export GO111MODULE=on
$ go install
go: finding github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135
go: finding github.com/marwan-at-work/vgop v0.0.0-20180824202541-054e5a7d7b48
go: finding github.com/PuerkitoBio/goquery v1.4.1
go: finding github.com/pkg/errors v0.8.0
go: finding github.com/andybalholm/cascadia v1.0.0
go: finding golang.org/x/tools v0.0.0-20180824175216-6c1c5e93cdc1
go: finding gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8
go: finding golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01
go: downloading gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8
go: downloading github.com/marwan-at-work/vgop v0.0.0-20180824202541-054e5a7d7b48
go: downloading github.com/pkg/errors v0.8.0
go: downloading golang.org/x/tools v0.0.0-20180824175216-6c1c5e93cdc1
go: downloading github.com/PuerkitoBio/goquery v1.4.1
go: downloading github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135
go: downloading github.com/andybalholm/cascadia v1.0.0
$ pushd ~/go/src/github.com/google/go-github
$ git checkout -b v21-experiment
$ mod upgrade
<html><head></head><body><p><em>Error:</em> Your request has found no candidate provider [hs="(null)", id="(null)"]</p></body></html> Am I doing something wrong? |
@gmlewis super weird...I can't seem to reproduce this issue. I tried to do the same thing:
What OS are you using and what version of Go do you have installed? This is most likely an issue with go/packages and so it'd be a good edge case to catch. Thanks! |
This laptop is MacOS High Sierra 10.13.6. |
Just now, I blew away $ rm -rf ~/go/src/github.com/marwan-at-work
$ sudo rm `which mod` Then tried to install from scratch: $ cd
$ GO111MODULE=on go get github.com/marwan-at-work/mod/cmd/mod
go: cannot find main module; see 'go help modules' |
@gmlewis yes this is a modules draw back, make sure you have a dummy go.mod file in your CWD (or just git clone github.com/marwan-at-work/mod and run go install from inside of it) |
@gmlewis let me know if blowing things away fixes things, if so i'll add a comment in the readme. Thanks! Reopening the issue, since my previous assumption is incorrect. |
Still no joy... here is a continuation from last time: $ cd
$ GO111MODULE=on go get github.com/marwan-at-work/mod/cmd/mod
go: cannot find main module; see 'go help modules'
$ touch go.mod
$ GO111MODULE=on go get github.com/marwan-at-work/mod/cmd/mod
go: cannot determine module path for source directory /Users/gmlewis (outside GOPATH, no import comments)
$ cat > go.mod
module github.com/marwan-at-work/mod
require (
github.com/PuerkitoBio/goquery v1.4.1
github.com/andybalholm/cascadia v1.0.0 // indirect
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect
github.com/marwan-at-work/vgop v0.0.0-20180824202541-054e5a7d7b48
github.com/pkg/errors v0.8.0
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d // indirect
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
golang.org/x/tools v0.0.0-20180824175216-6c1c5e93cdc1
gopkg.in/urfave/cli.v2 v2.0.0-20180128182452-d3ae77c26ac8
)
$ GO111MODULE=on go get github.com/marwan-at-work/mod/cmd/mod
go: finding github.com/marwan-at-work/mod/cmd/mod latest
go: finding github.com/marwan-at-work/mod/cmd latest
go get github.com/marwan-at-work/mod/cmd/mod: no matching versions for query "latest"
$ ls -lrt
total 2328
...
-rw-r----- 1 gmlewis gmlewis 604 Dec 12 22:16 go.mod
-rw-r----- 1 gmlewis gmlewis 1165 Dec 12 22:16 go.sum I'll try cloning the repo and install from there... |
OK, that worked, but here is a weird MacOS thing going on, I think: $ git clone git@github.com:marwan-at-work/mod
$ cd mod/cmd/mod
$ echo $GO111MODULE
on
$ go install
$ which mod
/Users/gmlewis/go/bin/mod
$ cd ~/go/src/github.com/google/go-github
$ mod upgrade
-bash: /Library/Frameworks/Mono.framework/Versions/Current/Commands/mod: No such file or directory
$ ~/go/bin/mod upgrade
Thank you, @marwan-at-work! |
interesting.. i was also having the issue when using iterm2 .. |
A little late, but I just updated the README to make notice of this issue and the solution. Thanks again for digging into it! |
Nevermind this was the wrong |
hi.. @marwan-at-work i'm trying to use a library that hasn't yet adopted modules (dgrijalva/jwt-go). so i forked the repo, cloned it and per the usage examples ran:
from the repo root directory (after running
go mod init
of course, sogo.mod
exists ..). on doing so, i get this error:needless to say, i do not know how to fix this issue. any help appreciated, thanks.
The text was updated successfully, but these errors were encountered: