sass / dart-sass

The reference implementation of Sass, written in Dart.
https://sass-lang.com/dart-sass
MIT License
3.97k stars 360 forks source link

Output error messages to be usable by VSCode problemMatcher #865

Closed jeffrson closed 2 weeks ago

jeffrson commented 5 years ago

As it stands, error messages cannot be analysed by VSCode's problemMatcher (which needs line-by-line matches).

I made a report here: https://github.com/microsoft/vscode/issues/83384 However, this has been closed in favor of "programmatic problemMatchers", but there is no estimation of any due date.

Maybe dart-sass could create error messages formatted to be used like node-sass's? If necessary with some additional command line parameter (which, of course, would need to be propagated to "middleware" like gulp-dart-sass).

nex3 commented 5 years ago

Would you be able to use the embedded protocol to invoke Sass and get the source span information that way?

jeffrson commented 4 years ago

As it seems one would need to create a host implementation, which IMO is not possible with VSCode directly. There should be a script, like "custom-sass", that does it - forward compile time information to dart-sass and read, format and output returned messages. Hmmm, are there simple examples doing this?

nex3 commented 4 years ago

If you're writing a wrapper executable, it's almost certainly easier to just write it in Dart to begin with rather than using the embedded protocol.