Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

New npm progress indicator #6911

Closed
3 of 5 tasks
iarna opened this issue Dec 12, 2014 · 7 comments
Closed
3 of 5 tasks

New npm progress indicator #6911

iarna opened this issue Dec 12, 2014 · 7 comments
Assignees
Milestone

Comments

@iarna
Copy link
Contributor

iarna commented Dec 12, 2014

As discussed elsewhere we want a better progress indicator than a spinner or logs. The multi-stage installer branch brings this. The current iteration of the indicator looks like this:

progressbar

So here we can see that we're extracting the form-data module. ("fetch" is a bit misleading here, that'll be corrected.) The last log entry section was gunzTarPerm, which gives you a pretty good idea of what's going on. The little clock just before the bar spins every time a log line would have been printed at a higher log level.

Remaining work:

  • Fix progress bar section reporting (eg, "fetch" in the screenshot). This just involves making each of the new stages "tick" the progress bar at least once.
  • Fix progress bar one way or another such that last 50% doesn't finish neigh instantly
  • Make new progress bar obey --unicode
  • There should be a facility for disabling the progress bar via config, like spin=false, maybe actually using spin…

And possibly:

  • Deeper integration of progress bar into other related tasks, eg, cache, request, rimraf, etc

See also: #1257, #5340, #6420

@asbjornenge
Copy link

Looks good 👍 🚀

@dominictarr
Copy link

yay

@tkellen
Copy link

tkellen commented Jan 13, 2015

woo

@iarna
Copy link
Contributor Author

iarna commented Mar 27, 2015

Closing this as fixed in npm/npm#multi-stage

@iarna iarna closed this as completed Mar 27, 2015
@iarna iarna removed the ready label Mar 27, 2015
@manpages
Copy link

Do these changes have something to do with problems with progress bar people across distros started to experience?

Such as

installing
install flags: install SHELL=/nix/store/kz4aii9y5kdxilxrjdz55gdr0piziwcz-bash-4.3-p33/bin/bash    
v0.13.0-pre
net.js:166
        throw errnoException(err, 'setBlocking');
              ^
Error: setBlocking ENOSYS
    at exports._errnoException (util.js:748:11)
    at new Socket (net.js:166:15)
    at createWritableStdioStream (node.js:466:18)
    at process.stderr (node.js:520:16)
    at Object.<anonymous> (/nix/store/lzns9av4iwjzdm81l3g3dgdklrmbvyfb-nodejs-0.12.0/lib/node_modules/npm/node_modules/npmlog/node_modules/gauge/progress-bar.js:9:28)
    at Module._compile (module.js:462:26)
    at Object.Module._extensions..js (module.js:480:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:367:17)
Makefile:5: recipe for target 'all' failed

Maybe the case is that I spawn npm process without running terminal emulator.

Have you tested new progress bar without terminal emulator running? With very thin terminal emulator (like 1-2 characters wide)?

UPD: I'm pretty sure it's the case; didn't do commit bisection though.

@iarna
Copy link
Contributor Author

iarna commented Jun 24, 2015

@manpages: Well, seeing is it hasn't actually been released, unless you're using a version from git directly, then no.

@iarna
Copy link
Contributor Author

iarna commented Jun 24, 2015

@manpages The gauge module did get brought in with an npmlog update a bit ago, but it's not actually being used at all as yet.

It looks like accessing the process.stderr file handle (while not actualy using it) is somehow causing a crash for you. I don't understand how that's possible– I'd definitely need more information (eg an npm-debug.log) in order to track that down. If this is still an issue for you and you'd like progress on it, please open a NEW issue with whatever diagnostics you have available. Thank you!

@npm npm locked and limited conversation to collaborators Jun 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants