Code Monkey home page Code Monkey logo

Comments (10)

lukekarrys avatar lukekarrys commented on June 7, 2024 1

Those are good suggestions. To take them point by point:

  1. There is a way to hide the cursor which should be easy enough to do only when the spinner is visible. I will look into this and any accessibility implications it might have.
  2. I'd be interested in seeing benchmarks if you have any from before and now. Also if you run with --no-progress do you still see a performance impact?
  3. The reason we moved away from how it used to work is that the progress bar showed messages that were primarily intended for logging. They weren't tailored for usability and would often show the last completed action when the current running action was hanging which led to lots of confusion. I'm in favor of bringing something similar back but we'd first need to put all the events in place in Arborist to accurately indicate what's happening in a user-friendly manner. But that will take more time.

Im going to log these in our follow up status board issue. Thanks for taking the time to provide these feedback!

from cli.

wraithgar avatar wraithgar commented on June 7, 2024

The progress bar in npm has been temporarily removed. It was conflicting with logging output and was generally inaccessible. What you are used to seeing is a mix of the progress bar and verbose logging (which was shown erroneously, regardless of loglevel). If you want to see the logging messages you can use --verbose.

from cli.

lorand-horvath avatar lorand-horvath commented on June 7, 2024

@wraithgar I would prefer seeing some kind of progress log while npm is actually performing some work, by default. Otherwise users might confuse the silence with the process being stalled or hanging or a bug or something. Sometimes an npm install on a large project may take several minutes. Something should be displayed (some sort of spinner, progress bar, etc) while doing work that take longer than, say, 5 seconds.
Is this total silence a temporary problem? Are you going to add back some kind of progress bar in later version?

I had to revert to 10.5.2 because this was very strange, not showing anything for long periods of time - I thought something was broken.

from cli.

wraithgar avatar wraithgar commented on June 7, 2024

Yes it is temporary.

from cli.

henderea avatar henderea commented on June 7, 2024

I thought something was broken

Same here, so I interrupted my npm update -gs command and then something actually was broken. As in my entire NPM install. I had to note down my global packages by looking at the contents of the install directory, then uninstall and reinstall node with NVM and install all of my stuff again.

Not a huge disaster, but definitely not great either.

So word to the wise: don't interrupt it when you have the -g flag, because you will probably break your NPM 😓

from cli.

lukekarrys avatar lukekarrys commented on June 7, 2024

We'll keep this open until we land a new "npm is actually doing something" visual. It probably won't be a progress bar initially but a simple spinner.

from cli.

lorand-horvath avatar lorand-horvath commented on June 7, 2024

@lukekarrys @wraithgar Thanks for taking the time to add the spinner! However, this could be improved upon, compared to how it was before in 10.5.2. My concerns are the following:

  1. The spinner is there as expected, but there's a constant blinking cursor overlapping with it and it looks a bit unfinished or buggy.
  2. The installation process seems slower. I could revert to 10.5.2 and time the installations to see what the difference is.
  3. The spinner is not enough as default information. In previous versions I really liked the way it informed the user about what was currently doing, for example during npm install, so I would very much like to see something of the sort:
\ install [email protected]
| install [email protected]
/ install [email protected]
- update [email protected]
\ update [email protected]
| reify etc...

Wouldn't that be nicer?

from cli.

wraithgar avatar wraithgar commented on June 7, 2024

You can get what you described by setting your log level to http, those were the logging messages "leaking" into the progress bar before.

from cli.

lorand-horvath avatar lorand-horvath commented on June 7, 2024

@wraithgar I've tried npm install --loglevel http and I get a long running list with the package downloads (http fetch), which is not bad per se, but I'd like to see what is actually being installed and also other activities being performed, not only what is being downloaded (or found in cache); all of this preferably in one single progress line (the previous action needs to be overwritten to the same line), similar to how it was before in 10.5.2.

from cli.

lorand-horvath avatar lorand-horvath commented on June 7, 2024
2. I'd be interested in seeing benchmarks if you have any from before and now. Also if you run with `--no-progress` do you still see a performance impact?

I've run several benchmarks on a certain package (react frontend app) and the difference is not so large:
npm 10.5.2: npm install finished in 1:10
npm 10.7.0: npm install finished in 1:07
npm 10.7.0: npm install --no-progress finished in 0:59

3. The reason we moved away from how it used to work is that the progress bar showed messages that were primarily intended for logging. They weren't tailored for usability and would often show the last completed action when the current running action was hanging which led to lots of confusion. I'm in favor of bringing something similar back but we'd first need to put all the events in place in Arborist to accurately indicate what's happening in a user-friendly manner. But that will take more time.

I'd very much like to see a user-friendly manner of displaying the currently performed action with npm install, I posted more details in my comment above to @wraithgar

Im going to log these in our follow up status board issue. Thanks for taking the time to provide these feedback!

Thank you @lukekarrys @wraithgar for your quick and constructive responses!

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.