-
Notifications
You must be signed in to change notification settings - Fork 252
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
Display progress bar on "interactive" (not CI) command line restore #4346
Comments
Restore previously solved this by writing out GET messages to let the user know what activity was taking place, however this is now hidden by default which causes users to once again think that NuGet is hung. Previous issue: https://github.com/dotnet/cli/issues/1623 The logging for dotnet restore is done by an MSBuild task. I don't know if it is possible to create a spinner by logging through the MSBuild logger. |
Spinners will not work for CLI scenarios, however ASCII progress bars would. 😄 @natemcmaster do you see enough info if you pass in |
@blackdwarf I see spinners all the time. https://github.com/sindresorhus/cli-spinners Or at the least, yes, progress like NPM. |
@shanselman that was a joke on my part. But, anyway, the main point is, does changing the verbosity influence this? |
I would have to test again. Point is, under fairly typical networking conditions (this was 3Mbs, consistently) we still saw a LONG pause with no feedback. You gotta show something. ...... dots....something. |
Just checked it @blackdwarf. I have 35Mbs here. Did -v but still waited around for a WHILE with no feedback. |
can we log a dot, w/ no "\n", for each get? or something like that? |
The fact that normal verbosity doesn't influence this is pretty bad. @rrelyea back in the day, nuget client used to have a verbosity setting for this. Did we remove that? In lack of that, I think that any output would be good. We could, I think, do a progress bar? Unless there is some limitation in the MSBuild loggers? |
The verbosity level is still there. A progress bar is difficult because restore downloads/discovers packages as it walks to be as efficient as possible, it doesn't know if there will be zero or a hundred packages downloaded until the end. Restore should have a great progress experience from the console, I'm just not sure what is possible given the way restore works and the limitations of the MSBuild logger. |
Dots could work. In the restore task NuGet knows the msbuild verbosity. It could convert lower level messages that it isn't going to display into dots. |
feedback from @DoRonMotter
|
A docker like progress bar with transmission rate / total size is actually quite useful. Here is a sample code to make a simple spinner https://blogs.msdn.microsoft.com/brada/2005/06/11/showing-progress-in-a-console-windows/. |
Hello, I was wondering whether there has been any progress in adding a simple progress bar to https://www.nuget.org/packages/libtorch-cuda-10.2/ and the user experience of I don't know if this is the correct project to report this problem (this existing issue seemed relevant). Please let me know if I should be opening an issue somewhere else, for example https://github.com/dotnet/sdk Also tagging @dsyme @interesaaat I'm using dotnet CLI tools on linux. This is the output of
|
For Microsoft's 2021 hackathon, I started working on this, however, now that NuGet is integrated in MSBuild, I found that MSBuild itself is blocking this from being possible to implement. Specifically, after an MSBuild log message is written, I need to be able to write the progress bar to the new last line on the console. However, MSBuild's For now, I feel like this issue is blocked. |
Hi @zivkan I'm really happy to hear you considered to work on this. It's easily the biggest problem with the user experience in dotnet package management for me. All other ecosystems have some way of indicating when the user is waiting for a package download to finish. In my case, still in 2021, I'm sometimes waiting more than 30 minutes for a I understand the difficulty you faced with new lines in the MSBuild design. Even in that case, I think nuget/msbuild can as a minimum do something like "if the package download seems to take more than 10 seconds, print a new line saying that nuget is downloading package, this might take a few minutes..." so there is at least an indication of what is going on. I'm actually really frustrated that nuget/msbuild project managers haven't addressed something so basic this for so long. |
We are running dotnet restore on large projects with lots of RuntimeIdentifiers, my network connection not being always fast can make the restore take more than 10min and while I'm not seeing any progress. This is quite a frustrating experience to say the least. @zivkan it seems you had a prototype on showing some progress. What should be done to have this upstream? Do you have this on a branch somewhere? |
@xoofx we on the MSBuild side are also interested in progress reporting, potentially including it into the Logger APIs the engine provides to Tasks so that loggers like Terminal Logger can report progress - this API shape is something we're hoping to work on partners with over the next few months. We'd prefer to do something in a unified way rather than each Task having to reimplement the wheel. |
@baronfel That's great to hear! I can see that dotnet/msbuild#6944 is opened. Unless someone is already working on it, and if this can help, I can make a proposal API with a PR to start the discussion? |
Has there been any progress on this? I work on a large monorepo within Microsoft and long NuGet restores of 15+ minutes are an everyday occurrence - and easily over an hour if you're doing some cross-cutting refactor. A progress bar would be great. |
We're working on this in MSBuild itself right now. The MSBuild engine will gain APIs for reporting progress, then Restore and other Tasks can use those APIs to tell the MSBuild engine what the status of their operations are. Once we have these APIs, MSBuild loggers like the new Terminal Logger can render these progress messages using things like progress bars. |
From @natemcmaster on January 20, 2017 17:33
Steps to reproduce
Get slow internet.
Clear nuget caches.
dotnet new.
Add dependencies to lots of packages not in the first-run cache warmup. This can be done in a simple app by adding a bunch of rids to
<RuntimeIdentifiers>
.dotnet restore.
Expected behavior
Show some sign of progress while downloading from the network. A spinner would be great, but even just confirmation that restore has begun would be helpful.
Actual behavior
No console output appears until NuGet is almost done with the restore. In the screenshot below, restore took over a minute (85 seconds). There was not console output until about 75 seconds after restore began
Environment data
dotnet --info
output: using 1.0.0-rc3cc @shanselman @blackdwarf
Copied from original issue: dotnet/cli#5406
The text was updated successfully, but these errors were encountered: