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

miss activity indicator and stats #1251

Closed
DanielRuf opened this issue Jul 2, 2018 · 8 comments
Closed

miss activity indicator and stats #1251

DanielRuf opened this issue Jul 2, 2018 · 8 comments

Comments

@DanielRuf
Copy link
Contributor

pnpm version:

2.9.0

I currently miss some activity indicator on the terminal (like it is done with yarn and npm) during installs.

Also I would like to see how long an install has taken (stats).

Expected behavior:

There should be an info about how long an install took and if something is happening.

Actual behavior:

There is no activity indicator in terminal on macOSX (zsh) and no stats info.

Additional information:

  • node -v prints: 10.1.0
  • Windows, OS X, or Linux?: macOS 10.13.4
@zkochan
Copy link
Member

zkochan commented Jul 2, 2018

ref #1021

What activity indicator you mean?
Don't you get output like this:

Imgur

The numbers in the stats are changing during install. And the stats of added/removed packages are printed

@DanielRuf
Copy link
Contributor Author

I mean stats like added x packages in y seconds like npm and yarn do.
Also I see no activity during binary downloads or other backend tasks (no activity spinner).

@zkochan
Copy link
Member

zkochan commented Jul 2, 2018

When big tarballs are downloaded (>=5MB), their download progress is reported:

There is this idea by @vjpr for logging packages that are being downloaded for X seconds. However, the packages that are slow to download are those that are big (related #1131). So probably we'll end up with an additional logging for big tarballs.

I think what we can do is log the HTTP issues that happen during installation. pnpm will retry downloading of packages if a timeout happens or an invalid tarball is returned or a 500 is responded, etc.

So it would look like

Resolving: total 62, reused 14, downloaded 0
   attempt #1. request to registry/foo/1.0.0 timed out
   attempt #2. registry/bar/1.0.0 responded 500

Also, I suggest to keep only the last 3 issues because with bad internet connection the output will get messy.

@DanielRuf
Copy link
Contributor Author

Sounds very good and helpful.

Is the progress only for tarballs > 5MB available and can this threshold be set?

@zkochan
Copy link
Member

zkochan commented Jul 2, 2018

It is currently hardcoded here: https://github.com/pnpm/pnpm/blob/master/packages/default-reporter/src/reporterForClient.ts#L31

I don't have objection making it configurable but be aware that too much logging also causes slow down.

@DanielRuf
Copy link
Contributor Author

I don't have objection making it configurable but be aware that too much logging also causes slow down.

Right, I totally agree with you regarding this.

@DanielRuf
Copy link
Contributor Author

As info, this is the output in mingw64 on Windows (the Git bash).

No progress bar =/

$ pnpm i pa11y
Packages: +66
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Resolving: total 66, reused 25, downloaded 41, done

localhost+4873/puppeteer/1.5.0           |     install$ node install.js

@DanielRuf
Copy link
Contributor Author

Closing as I am not actively working with Node on macOS anymore and this might have already changed in newer releases and this could be obsolete / resolved now.

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

2 participants