-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Make warnings evident in different workflows #2461
Comments
AD 1. From what I can see, upon running AD 1. I use gulp-less for building my project. It'd be great if that logged something when it sees a warning. Perhaps |
At first glance I'd rather suggest to put warnings as comments into the generated CSS itself (i.e. |
I think it is more correct to put errors and warnings into stderr, it would allow scripts to check for warnings and errors easily. lessc will be often run by tools instead of manually and having to parse output.css for warnings and errors is ugly. |
Well, that's not just
Many tools interpret any output in To be more specific my idea is not to replace |
@seven-phases-max That is a good point. Out of curiosity, which tools do that? I got curious and tested gcc, python and javac compilers on windows. All three print both errors and warnings into stderr. They use exit code 1 when they encounter error and exit code 0 when they encounter warnings only. That does not mean we have to do it the same way, just that it is the standard way. If too many tools in js/css word tend to misinterpret streams, it might make sense to go with them. But, I still think it is their bug and they should fix it :). |
I think we should print to stderr and not assume gulp/grunt should use this http://lesscss.org/usage/#programmatic-usage-getting-access-to-the-log |
For this LESS input:
we only see a warning when we explicitly run:
$ lessc input.less output.css extend ' .non-existent-selector' has no matches
There are a couple of problems with this:
$ lessc input.less
, or programmatically with node – there's no warning at all.Why it's important:
For the record:
The text was updated successfully, but these errors were encountered: