-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
The failure doesn't seem to have anything to do with the PR. So, looks perfect to me!! |
@wesleytodd yeah, was just investigating that. Everything seems to pass locally, and the test that it is failing on is testing |
Ok, I think this is because |
yes @paulcpederson, this is going to work fine. |
I think #854 addresses this. Should probably wait to merge until that pr is in. |
Cool, I think that I think that warnings should be on by default, normal Now: [ ] Line 293 in 3d44ce8
warn on file change - should be changed to log and quiet by default)[ ] Line 318 in 3d44ce8
emitter.emit('warn', util.format('Wrote %s CSS files to %s', arr.lenth, outputDir)); should be log and quiet
Mainly this is about whether watcher should be quiet or not. Anything else that gets generated? |
I think #856 proves nobody needs those messages :) |
Glad I took a second look at this, I think we fell prey to the stdout is for output thing again. If you passed Render uses log to ouput when we don't have a dest file: https://github.com/sass/node-sass/blob/master/lib/render.js#L54 So you probably need to remove the one on |
@saper For the Also this is consistent other tools like gulp and browserify which output helpful confirmation messages when they do something. |
Those sould simply go away in my opinion... https://github.com/sass/node-sass/blob/master/lib/render.js#L54 Re breaking change: we are still not at level 3.0.0, it's a good time to clean up logging! When redesigning logging we should keep also #646 in mind We have a bit of a design choice: Do we prefer chatty npm/http-server style or quiet UNIX? :) I think chatty is okay when doing |
Maybe we are not on the same page here, those lines enable you to pipe the output in a unix fashion. So removing them would break this use case: The emit log there is actually the quite UNIX method you mentioned above. |
Ok, let me actually try how it works... |
Seems like the warns are what you want to get rid of by default. right @saper? |
No, I think warns should be there, but some messages we have here don't qualify as a "warning". Maybe there is a problem with the default logging hierarchy. |
The idea as I understand it now is this:
So the idea would be to make the |
Need to think about it a bit... node sends Would be great to document all places where we log something. |
@wesleytodd nice catch on render emitting on As per the grander conversation of
Right? |
@wesleytodd ok, updated it so that I think toggling off Totally willing to flip this pr so that it is a |
Personally I like how it works now. But I can see the argument for it being more unix like with no output. Maybe getting more core team members opinions would be good before making a decision one way or another? @akhleung @am11@andrew @deanmao @kevva @nschonni Sorry if I bothered anyone who is not involved anymore, I just tagged the top ppl on the contributors list. |
LGTM. @xzyfer, IMO @wesleytodd and @paulcpederson have better insights on CLI aspect. |
LGTM. IMO the average needs/wants a certain amount of output to know that something has happened. I'd be hesitant to go too quiet by default. If I've followed the conversation correctly, I also agree that we current use |
Yes, unfortunately "warn" seems to be the lowest "stderr" level by default (maybe the emitter could change this). Also |
Agreed. I don't believe this PR changes that behaviour unless the |
Yep. This pr leaves the current behavior as is, just adds the ability to turn that off. After #854 gets merged I'll rebase so that the tests pass. |
@paulcpederson it is done! |
😭 🎉 |
Merging this in preparation for the next beta release. Great work @paulcpederson! Thanks for all your feedback @saper |
👍 |
🎉 |
Fix parsing and output of unknown at-rules (Fixes sass#855)
Don't want to step on toes here if you were already working on this, @gibatronic , but thought I'd take a stab at implementing the
-q, --quiet
flag for the cli.I think this addresses the use case of #841
Wrote some tests to ensure that the flag keeps the cli from outputting to
stderr
onlog
andwarn
. Also wrote a test to ensure thaterror
is still passed through, regardless of if--quiet
is used by creating aninvalid
fixture which contains a reference to an undefined sass variable.@gibatronic would this successfully enable you to do what you need to do?
/cc @am11 @wesleytodd