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

cmd/go: add ability to download info, mod and source zip #26577

Closed
arschles opened this issue Jul 24, 2018 · 9 comments
Closed

cmd/go: add ability to download info, mod and source zip #26577

arschles opened this issue Jul 24, 2018 · 9 comments
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@arschles
Copy link

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.

@gopherbot gopherbot added this to the vgo milestone Jul 24, 2018
@bcmills bcmills changed the title x/vgo: add ability to download info, mod and source zip cmd/go: add ability to download info, mod and source zip Jul 25, 2018
@bcmills bcmills modified the milestones: vgo, Go1.11 Jul 25, 2018
@bcmills
Copy link
Contributor

bcmills commented Jul 25, 2018

Is this the same thing as #26609?

@rsc
Copy link
Contributor

rsc commented Jul 26, 2018

Yes, indeed. Sorry for the duplication - I hadn't seen this yet.

@marwan-at-work
Copy link
Contributor

marwan-at-work commented Jul 26, 2018

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 :)

@arschles
Copy link
Author

@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

@marwan-at-work
Copy link
Contributor

@arschles go list -m -versions already works. We just have to be inside a dummy go module, which is a bit hacky :)

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 26, 2018
@arschles
Copy link
Author

arschles commented Jul 27, 2018 via email

@marwan-at-work
Copy link
Contributor

Should this be a release blocker just like its #26609 dup?

@marwan-at-work
Copy link
Contributor

marwan-at-work commented Aug 1, 2018

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/gopherjs@v0.0.0-20180315154859-97d8e769111c 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.

@gopherbot
Copy link

Change https://golang.org/cl/128355 mentions this issue: cmd/go: add go mod download

@golang golang locked and limited conversation to collaborators Aug 10, 2019
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants