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

Comments

Projects
None yet
5 participants
@arschles
Copy link

commented Jul 24, 2018

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

@arschles arschles referenced this issue Jul 25, 2018

Merged

Moving the fetch logic into 'pkg/module' #291

2 of 2 tasks complete

@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 added the modules label Jul 25, 2018

@bcmills bcmills modified the milestones: vgo, Go1.11 Jul 25, 2018

@bcmills

This comment has been minimized.

Copy link
Member

commented Jul 25, 2018

Is this the same thing as #26609?

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2018

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

@marwan-at-work

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

commented Jul 26, 2018

@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

This comment has been minimized.

Copy link
Contributor

commented Jul 26, 2018

@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 label Jul 26, 2018

@arschles

This comment has been minimized.

Copy link
Author

commented Jul 27, 2018

@marwan-at-work

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2018

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

@marwan-at-work

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Aug 7, 2018

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

@gopherbot gopherbot closed this in 9f4ea6c Aug 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.