-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go get can block for extremely long periods of time without any indication of functionality #23332
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
go get
can block for extremely long periods of time without any indication of functionality.
This isn't a proposal. It's a bug with the current behaviour. I can't think of any way the current way it works is correct. |
go get
can block for extremely long periods of time without any indication of functionality
It is there in the flag description section. Although not in the usage section. That needs a fix.
Assuming that the The overall opinion is varied on this. Some people want their tools to be quiet and only print errors. While some think doing a |
I could have sworn I grepped the help and didn't find it, but there it is. Gah. I probably fail at grep.
Name one package manager like this that has no output by default. I've used npm, pip, apt-get, apt, pacman, yum, choco, and probably others I can't remember, and they all have status output. There are plenty of tools that have a I do think the |
Change https://golang.org/cl/85797 mentions this issue: |
I posted one of the issues @fake-name referenced. I agree that little indication of progress should be shown even if not a progress bar. There can be a compromise between no indication whatsoever and too detailed (verbose) indications. |
If one wants to see what's going on, |
Please read carefully what I wrote.
I'm talking about go tools. Most go commands and tools by default print nothing on success. When I write "most go tools are quiet by default" I'm thinking about internal consistency (i.e., making all go commands and tools behave in a similar way regarding when to write output). It is also true that most tools always do their job quickly -unless you're e.g. building a huge codebase- while One thing we could do is make more clear that the command is silent by default, for example in
or something like that. |
go get
can block for extremely long periods of time without any indication of functionalityUpdates #23332 Change-Id: I964d36ed751ef1844ab6c40f61047297ff1443a3 Reviewed-on: https://go-review.googlesource.com/85797 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Point taken. In that case, the entire go ecosystem has broken assumptions, that makes it inconsistent with every other ecosystem I've ever touched.
Who exactly doesn't want it? Functionally, it's a package manager. It should be expected to operate like every other package manager, or if you're going to break with consistency, there should be a good reason. "Other go CLI tools are quiet" is not a good reason, particularly when you realize that the package manager is one of the first things people come into contact with when trying to use the language. Note: I personally think a package manager acting like a package manager is much more important then it being consistent with other go tools. YMMV All this started because I just wanted to execute a program written in go. The way it works now, "normal behaviour" is indistinguishable from the tool being broken, unless you blindly let it sit at the command prompt seemingly doing nothing for 10+ minutes (at least in some cases). It doesn't even use enough CPU to indicate it's doing something (presumably because it's blocked on network stuff). |
Many unix-y programmers. It's how most unix tools work - for decades.
It's the opposite. Unix tools are consistently quiet until they have to say something.
It should be easy to make an alias for the
You're probably coming from Windows, I guess. I can tell you that I understand your pain very well. I have the same desperate feeling of nothing working as expected when I occasionally must use Windows. But forcing unix expectations to all Windows users would be a patently bad idea, do you agree? |
Nope. I do almost all my dev work on linux.
Name one package manager that's silent default.
Well, |
The Times They Are a-Changin'
I'm talking about unix tools and I do not even consider But this all is in accordance with how all the good values of unix are being slowly ruined in general. |
I'd even go more general then package manager, and say name one linux CLI tool that can block for > 1 second and has no CLI output. The only thing I can think of is And yes, I'm talking about package managers, because that's what You mention Frankly, I bought up package managers because I think they're a great example of a complex unix CLI tool. As far as I know, they started on *NIX, so the fact that they are not completely silent kind of directly contravenes the entire "silent-by-default is unixy" argument. Heck, looking at |
Sounds like a ruling from an authority with decisive power about this question. There's nothing to add. |
go get is not a package manager, it doesn't have have the concept of
'version'. It's more correct to see it as a simple Go package downloader.
dep (https://github.com/golang/dep) is a WIP package manager for Go
that is similar to the other package managers you keep mentioning.
2018-01-05 11:58 GMT+01:00 Connor Wolf <notifications@github.com>:
… I'd even go more general then package manager, and say name one linux CLI
tool that can block for > 1 second and has no CLI output. The only thing I
can think of is cp on a very, very large directly.
And yes, I'm talking about package managers, *because that's what go get
is*, and the expectations for it should be commensurate.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23332 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADa683iBl8w5qGxSuA1sImVnFsCaySxvks5tHgBngaJpZM4RSkpW>
.
|
Well, point taken. Can we say it should act like |
Can we say it should act like wget and output status, then?
Can you explain why it should? Because it confuses newcomers?
It only happens *once*. Then you learn that it's quiet by default, and
that's it.
On the other hand, if you make it loud by default, you'll be printing
useless
information for everyone else, forever. I'm not sure it's worth it.
I already suggested a less invasive way to make this easier for newcomers
(an update to the --help text, which is surely the first thing you look at
if you're puzzled by empty output).
Would that have helped you?
2018-01-05 12:08 GMT+01:00 Connor Wolf <notifications@github.com>:
… go get is not a package manager, it doesn't have have the concept of
'version'. It's more correct to see it as a simple Go package downloader.
Well, point taken.
Can we say it should act like wget and output status, then?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23332 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADa681xgy7MoWcK_WF9lJphN9F4_PTidks5tHgLEgaJpZM4RSkpW>
.
|
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
I haven't used go before, and I'm trying to get a tool I found on github working. I just spent the last ~30 minutes assuming
go get
was broken, because it just sat there doing nothing for 10+ minutes.I ran it as
go get ./...
, and I assumed I had done something likecat
with no arguments, and it was waiting for data overstdin
or something.go get
needs to output something to indicate it's actually doing anything.I've read over #18388 #22356 #22800 and am completely unconvinced.
The consensus on those answers is:
Uh, [citation needed]. This is completely not true.
At the moment, I can't think of a single CLI tool I use that can block for long periods of time that doesn't have some output.
apt-get
has some status output.git
has some status output.cmake
has some status output.wget
has some status output.Frankly, barring some poorly written tools of my own creation, I don't think I can recall ever seeing a tool that blocked for very long periods of time at start with absolutely no output.
I don't need a progress bar or whatnot, but as someone trying to use some go tooling for the first time, having
go get
print something like "fetching dependencies. this may take a while` before blocking would have been enough.Additionally, the
-v
flag *is not documented. I looked atgo get --help
, and it's not mentioned at all (I thought about it, but assumed it wasn't supported, since the help page didn't mention it).The text was updated successfully, but these errors were encountered: