-
Notifications
You must be signed in to change notification settings - Fork 18k
Problems updating a package using go get with GO111MODULE=on #27028
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
Comments
UPDATE: |
Hi @carlca, I'm not an expert, but a couple quick comments. One comment is that when you are running a command like That's a bit informal, but here is a more formal statement from the HTML documentation on tip.golang.org: https://tip.golang.org/cmd/go/#hdr-Defining_a_module
Also, I believe In case this might be helpful, there's an a quick write-up here, along with some short "how to" sections that follow: edit: couple small clarity improvements |
Hi @carlca, also, looking at this more, it seems github.com/dave/wasmgo is a command/binary? So it sounds like part of your question then might be how do you install a command/binary via @gopherbot, please add label modules |
@carlca You might be hitting a variation of #24250. One snippet from there:
...which gets back to some of my earlier comments about the behavior is currently expected to be different depending on where you are in the filesystem when you run |
Hi, @thepudds, would you mind having a look at the series of tweets I've just had involving Russ Cox. They are at Me: https://twitter.com/carlcaulkett/status/1034516890373304320 I cannot work out why Russ is saying that "module based go get works fine for me" unless he is running a beta version of 1.12 and just hasn't mentioned it! Otherwise, I fear it's a bit of a politician's answer! |
If you are running with Even then, you will probably still need to be inside a module if the thing you are getting is not a |
|
@carlca sorry for the late reply, but given you had addressed that question to me, just wanted to briefly comment that I looked at those tweets, and I don't think Russ was giving a politician's reply. ;-)
I think you've seen this, but some of the options for some of those rough edges are mentioned in some of the FAQs on the modules wiki, including this shell script by rogpeppe. So in short, |
Okay. Suppose we take a github package My question, then, is: if one uses Certainly, the I feel like I am still missing a crucial bit of understanding here... UPDATE: I've just read the FAQs and looked at the shell script. Had I seen those a few weeks or months ago, then perhaps this whole episode might not have been so wearisome! |
FAO: @rsc
What version of Go are you using (
go version
)?go version go1.11rc1 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOOS="darwin"
What did you do?
I'm running with GO111MODULE=on.
I used
go get -u github.com/dave/wasmgo
to install a package for the first time yesterday. I didn't have to usego mod init
at all, and it successfully installed to~/code/go/pkg/mod/github.com/dave/[email protected]
.The author has made changes to the package, so I ran
go get -u github.com/dave/wasmgo
again, but I got the errorgo: cannot find main module; see 'go help modules'
.I was able to fix this by running
go mod init go
in my~/go
folder to create a dummygo.mod
file -go get -u github.com/dave/wasmgo
then ran successfully.It then occurred to me that littering my machine with dummy
go.mod
files was probably not a good idea, so I navigated to the aforementioned~/code/go/pkg/mod/github.com/dave/[email protected]
folder and rango mod init github.com/dave/wasmgo
. I got the error...Despite the first line of the error message,
go.mod
has not been created.How do I fix this? I cannot believe I have to create a
go.mod
file in a higher level, generic (oops, the "G" word!) folder. Any ideas?What did you expect to see?
I expected to be able to run
go mod init github.com/dave/wasmgo
in the...\v0.0.0-20180816095012-16077efc512b
folderWhat did you see instead?
Permission denied message as explained above.
The text was updated successfully, but these errors were encountered: