In the Athens project, the code that downloads code from VCS's and stores it in the database uses go get behind the scenes. We have to do some hacky things right now - like create a skeleton go.mod file and an empty func main() {} to get go get to work.
Instead of doing that, we'd like to use a command - say, go get $THING --artifacts-only - that downloads the code from the appropriate VCS (still respecting redirects, etc... as it does now), creates the source zip, and then leaves just the info, mod, and source zip in the current directory. and all of this without requiring that there is a valid go.mod and any go code in the cwd.
Is this the same thing as #26609?
Yes, indeed. Sorry for the duplication - I hadn't seen this yet.
would this be in the scope of being able to do something like go list -m -versions [module]@latest from outside of a module directory? #26609 hinted at that but this issue doesn't mention it which is why im asking :)
@rsc what do you think about a go list command?
@marwan-at-work mentioned today at the athens dev meeting that we might have to duplicate internal code from cmd/go to get list working properly on the server
@arschles go list -m -versions already works. We just have to be inside a dummy go module, which is a bit hacky :)
I wonder if we can add “don’t require go list -m to be in a go module” to
the wishlist on this issue 😊
On Thu, Jul 26, 2018 at 11:52 Marwan Sulaiman notifications@github.com
wrote:
@arschles https://github.com/arschles go list -m -versions already
works. We just have to be inside a dummy go module, which is a bit hacky :)—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/26577#issuecomment-408198429, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAEU0avamQSCPoUZzBDsQVDiHWFRlI1Bks5uKhALgaJpZM4VfGit
.
Should this be a release blocker just like its #26609 dup?
Also from Athen's perspective, it's okay to just do all three at the same time (info/mod/zip). As long as Go doesn't traverse the dependencies of what we're asking for and tries to download them and "go install" them. This has led to some failed builds. go get github.com/gopherjs/[email protected] for example fails, but if it's inside a mod file that doesn't need one of the dependencies that make it fail, then go build will work.
Change https://golang.org/cl/128355 mentions this issue: cmd/go: add go mod download
Most helpful comment
Change https://golang.org/cl/128355 mentions this issue:
cmd/go: add go mod download