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

Regression (expansion) in dotnet restore --quiet output #2069

Closed
dougbu opened this issue Feb 7, 2016 · 7 comments
Closed

Regression (expansion) in dotnet restore --quiet output #2069

dougbu opened this issue Feb 7, 2016 · 7 comments
Assignees
Milestone

Comments

@dougbu
Copy link

dougbu commented Feb 7, 2016

Something has recently regressed w.r.t. --quiet support. With the current .NET CLI, our builds look like:

info: Exec
info:   program: dotnet
info:   commandline: restore --quiet
info:   workingdir: C:\dd\dnx\Universe\Antiforgery
log  : Restoring packages for C:\dd\dnx\Universe\Antiforgery\samples\AntiforgerySample\project.json...
log  : Restoring packages for C:\dd\dnx\Universe\Antiforgery\test\Microsoft.AspNetCore.Antiforgery.Test\project.json...
log  : Restoring packages for C:\dd\dnx\Universe\Antiforgery\src\Microsoft.AspNetCore.Antiforgery\project.json...
log  : Restoring packages for C:\dd\dnx\Universe\Antiforgery\test\Microsoft.AspNetCore.Antiforgery.FunctionalTests\project.json...
info :   GET https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   GET https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   GET https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   GET https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json 394ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json 415ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json 424ms
info :   OK https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json 1018ms
info :   OK https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json 1044ms
info :   OK https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json 1060ms
@yishaigalatzer
Copy link

@dougbu can you share the before compared to the after and what is the expected output?

@dougbu
Copy link
Author

dougbu commented Feb 7, 2016

I don't have the before picture because I closed that PowerShell window, sorry. For comparison, dnu restore --quiet outputs:

Microsoft .NET Development Utility Clr-x86-1.0.0-rc2-16484

Restoring packages for C:\dd\dnx\Universe\Antiforgery\samples\AntiforgerySample\project.json
Writing lock file C:\dd\dnx\Universe\Antiforgery\samples\AntiforgerySample\project.lock.json
Restore complete, 965ms elapsed

dnu restore outputs:

Microsoft .NET Development Utility Clr-x86-1.0.0-rc2-16484

  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/index.json
  CACHE https://www.nuget.org/api/v2/
Restoring packages for C:\dd\dnx\Universe\Antiforgery\samples\AntiforgerySample\project.json
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNetCore.DataProtection'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.webutilities/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNetCore.WebUtilities'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.extensions.objectpool/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Extensions.ObjectPool'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.http.abstractions/index.json

  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNetCore.Http.Abstractions'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.http.extensions/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNetCore.Http.Extensions'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.iisplatformhandler/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNetCore.IISPlatformHandler'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.server.kestrel/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNetCore.Server.Kestrel'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.staticfiles/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.AspNetCore.StaticFiles'
  CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.netcore.platforms/index.json
  CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.NETCore.Platforms'
Writing lock file C:\dd\dnx\Universe\Antiforgery\samples\AntiforgerySample\project.lock.json
Restore complete, 981ms elapsed

NuGet Config files used:
    C:\Users\dougbu\AppData\Roaming\NuGet\nuget.config
    C:\dd\dnx\Universe\nuget.config
    C:\dd\dnx\Universe\Antiforgery\nuget.config

Feeds used:
    C:\Users\dougbu\AppData\Local\NuGet\Cache
    https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/
    https://www.nuget.org/api/v2/

And dotnet restore --quiet or dotnet restore outputs 3 screenfuls of information:

log  : Restoring packages for C:\dd\dnx\Universe\Antiforgery\samples\AntiforgerySample\project.json...
info :   CACHE https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json 383ms
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json.
info :   CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json.
info :   CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.webutilities/index.json
info :   CACHE https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.webutilities/index.json
info :   CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.dataprotection/index.json
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json.
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.objectpool/index.json.
info :   CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.extensions.objectpool/index.json
info :   CACHE https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.extensions.objectpool/index.json
info :   CACHE https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.aspnetcore.http.abstractions/index.json
info :   CACHE https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.extensions.objectpool/index.json
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.abstractions/index.json.
info :   CACHE https://www.myget.org/F/aspnetvolatiledev/api/v3/flatcontainer/microsoft.aspnetcore.http.abstractions/index.json
...
info :   GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.staticfiles/index.json.
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json 393ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.extensions.objectpool/index.json 492ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json 507ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json 371ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.extensions/index.json 491ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.iisplatformhandler/index.json 496ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.extensions.objectpool/index.json 390ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json 403ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.extensions/index.json 542ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.extensions/index.json 393ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.abstractions/index.json 571ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.abstractions/index.json 585ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.iisplatformhandler/index.json 390ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.staticfiles/index.json 552ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.server.kestrel/index.json 589ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.server.kestrel/index.json 570ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.iisplatformhandler/index.json 625ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.staticfiles/index.json 569ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.dataprotection/index.json 562ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json 555ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.abstractions/index.json 571ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.extensions.objectpool/index.json 584ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.abstractions/index.json 580ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.extensions.objectpool/index.json 779ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.iisplatformhandler/index.json 562ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.extensions/index.json 579ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.staticfiles/index.json 561ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.staticfiles/index.json 563ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.server.kestrel/index.json 576ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.server.kestrel/index.json 578ms
info :   NotFound https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.webutilities/index.json 912ms
log  : Committing restore...
log  : Restore completed in 4677ms.

NuGet Config files used:
    C:\dd\dnx\Universe\Antiforgery\NuGet.Config
    C:\dd\dnx\Universe\NuGet.Config
    C:\Users\dougbu\AppData\Roaming\NuGet\NuGet.Config

Feeds used:
    https://www.myget.org/F/aspnetcidev/api/v3/index.json
    https://api.nuget.org/v3/index.json
    C:\Users\dougbu\AppData\Local\NuGet\Cache
    https://www.myget.org/F/aspnetvolatiledev/api/v3/index.json

@dougbu
Copy link
Author

dougbu commented Feb 7, 2016

Even dotnet restore --verbosity error isn't as quiet and doesn't contain as much useful data as dnu restore --quiet. Can't turn off the list of feeds, which changes very rarely. And neither --verbosity warning nor --verbosity error provide information about the current project(s) during a recursive restore.

Regardless, dotnet restore --quiet shouldn't act identically to ... --verbosity information.

@yishaigalatzer
Copy link

@joelverhagen please take a quick look, if this is a low hanging fruit we might take it for 3.4 release. Otherwise it will go on the backlog to be prioritized with everything else open.

@joelverhagen
Copy link
Member

We need to decide on the desired functionality here. The previous ask was to a) have HTTP statuses (e.g. those GET and NotFound lines) show by default but b) have a way to silence these while still leave the Installing {package ID} {version}... message. This was implemented with a --verbosity minimal.

To summarize, it seems some problems with the current implementation (@dougbu, please add to this if I am missing something):

  1. There is not a way to silence the summary at the end of the output.
  2. --quiet option is not supported.
  3. The minimal option for the --verbosity switch does not appear in the help text.

To remedy this, I could map --quiet to --verbosity minimal and hide the information summary (config files used, feeds used, and install counts) on minimal, warning and error. Does this sound okay?

The only gap is to decide whether the Installing {package ID} {version}... messages should be shown at minimal level. My thought is that we can make these messages info levels, so on by default but hidden at minimal level.

@yishaigalatzer
Copy link

Lets remove --quiet completely and add the minimal to the help.

@joelverhagen
Copy link
Member

Fixed with NuGet/NuGet.Client#263. Spoke with @dougbu offline about this.

  • Fixed the help text.
  • Left Installing {package ID} {version}... in minimal log (parity with dnu restore --quiet)
  • Moved Committing... message to Information level.

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

No branches or pull requests

3 participants