Add silly logging for lifecycle.js #9227

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@saper
Contributor
saper commented Aug 11, 2015

This is to reduce the amount of frustraction while troubleshooting various custom lifecycle script environment.

Cons: user's privacy, if any

@iarna iarna was assigned by othiym23 Aug 11, 2015
@othiym23 othiym23 added the review label Aug 11, 2015
@iarna
Member
iarna commented Aug 24, 2015

FYI: We update the authors file automatically as part of our release process, so we don't look for that in pull requests.

As for this pull request, I'm happy to take this, but I think I'm going to remove the env logging as I fear that would make our already large logs much too big. If you'd like to pick out some key env vars, I'd probably be up for that though.

@iarna iarna added this to the 3.x-next milestone Aug 24, 2015
@saper
Contributor
saper commented Aug 24, 2015

I had this doubt too, but first I have no idea whether PATH or LD_LIBRARY_PATH or PATHEXT or COMSPEC or who-knows-what breaks pretty fragile lifecycle scripts. Additionally, having thousands of addNameRange logged already doesn't make it so bad in comparison, given that mostly up to three lifecycle scripts are invoked per npm run.

@saper saper Add silly logging for lifecycle.js
This is to reduce the amount of frustraction
while troubleshooting various custom
lifecycle script environment.

Cons: user's privacy, if any
8994d96
@iarna iarna added a commit that referenced this pull request Aug 25, 2015
@saper @iarna saper + iarna lifecycle: Add additional logging
To make debugging of lifecycle scripts easier

PR-URL: #9227
d088b7d
@othiym23
Contributor

Landed, with a bit of tweaking by @iarna, as d088b7d, included in npm@3.3.1. Thanks for putting this together and your time, @saper!

@othiym23 othiym23 closed this Aug 28, 2015
@othiym23 othiym23 removed the review label Aug 28, 2015
@saper
Contributor
saper commented Aug 28, 2015

Thanks, commented on one little nit. Can we have this in 2.x as well?

@othiym23
Contributor

Can we have this in 2.x as well?

The team decided that it wasn't worth the time to backport this to 2.xnpm@3 is very close to coming out of beta, and going forward, we want to switch to mostly fixing only critical or security issues in npm@2, not adding new functionality.

@saper
Contributor
saper commented Sep 11, 2015

Can we discuss the 2.x issue again? This was a missing feature from the start. I got another issue with running lifecycle script in some kind of restricted environment (sass/node-sass#1138) and the log says only "17721 info node-sass@3.3.2 Failed to exec install script". npm 2.x will be around for some time and it is really difficult to troubleshoot anything related to custom lifecycle scripts this way....

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