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: go get download progress and download speed status #15959

Open
prithvi16 opened this issue Jun 5, 2016 · 10 comments
Open

cmd/go: go get download progress and download speed status #15959

prithvi16 opened this issue Jun 5, 2016 · 10 comments
Milestone

Comments

@prithvi16
Copy link

prithvi16 commented Jun 5, 2016

go 1.6
linux_amd_64

problem

go get is an awesome tool download and install repositories from websites. But the problem is many times due bad internet connection or varying internet speed or a large repository it takes a lot of time.All we can do is look at blinking the cursor and there is no way to know how much code has been downloaded or is it installing or downloading .

feature request

I would like to request this feature of percentage of completed download and download speed status
in go get tool. It will be very helpful for gophers with slow internet access.

@dlsniper
Copy link
Contributor

dlsniper commented Jun 5, 2016

I would also like this to have a switch to enable machine readable progress so that other apps can read it and display it. Thank you.

@ianlancetaylor ianlancetaylor changed the title cmd/get : (feature request) download progress and download speed status cmd/go : (feature request) go get download progress and download speed status Jun 5, 2016
@ianlancetaylor ianlancetaylor changed the title cmd/go : (feature request) go get download progress and download speed status cmd/go: (feature request) go get download progress and download speed status Jun 5, 2016
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jun 5, 2016
@adg adg changed the title cmd/go: (feature request) go get download progress and download speed status cmd/go: go get download progress and download speed status Jun 5, 2016
@adg
Copy link
Contributor

adg commented Jun 5, 2016

Seems hard to do, considering we shell out to git, hg, svn, etc to do the actual file transfers.

go get -v might give you enough information to see what's happening.

@prithvi16
Copy link
Author

most of the time we only use GitHub i.e. git. Can't we use git's built-in progress status ?
for ex. git clone command

@PaluMacil
Copy link

PaluMacil commented Jun 8, 2016

For git you'll want to use --progress when not using a terminal. -v isn't necessary since it doesn't affect the progress output...

--progress

Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified. This flag forces progress status even if the standard error stream is not directed to a terminal.

I'd be a little concerned that this would be confusing if not provided in the other supported systems, but then I actually didn't realize till now that you actually could use hg, svn etc, so perhaps if you're using those you also know to look for some inconsistencies as the masses swarm git.

@dchapes
Copy link

dchapes commented Jun 8, 2016

For git you'll want to use --progress when not using a terminal

For reference, with mercurial the same thing would be something like --config progress.assume-tty=true (this would still respect any progress.disable=true that might be in an hg config file).

@FrankFang
Copy link

go get -v does not provide enough progress information

@GongT
Copy link

GongT commented Jul 19, 2018

git's original output is super important to debug proxy issue.

It's not only a "progress".

@anacrolix
Copy link
Contributor

Make another flag for progress. Stop lumping all this behaviour onto a single flag, it just ends in bikeshedding about what constitutes verbosity.

@eaglexiang
Copy link

we do need more progress for go get, not step-progress like

repo0 (download)
repo1 (download)
...

but download-progress like

Rceiving:  14% (368/2626), 36.01 KiB | 46.00 KiB/s

which enables us to confirm if the net connection is healthy or dead. It's important for user-friendly and also for debug.

go get does call git for pull, it's git's duty to show what we need, so why not just redirect IO of git to standard IO of go get?

refer to https://gist.github.com/Jimmy-Xu/275c98cdc7be327c9607

@diamondburned
Copy link

This is fairly easy, even in Go code:

proc := exec.Command()
proc.Stderr = os.Stderr
proc.Start()

I don't see why this shouldn't be a thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests