dart-sass icon indicating copy to clipboard operation
dart-sass copied to clipboard

Output error messages to be usable by VSCode problemMatcher

Open jeffrson opened this issue 6 years ago • 3 comments

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).

jeffrson avatar Oct 28 '19 09:10 jeffrson

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

nex3 avatar Oct 30 '19 21:10 nex3

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?

jeffrson avatar Nov 23 '19 11:11 jeffrson

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.

nex3 avatar Nov 26 '19 01:11 nex3