-
Notifications
You must be signed in to change notification settings - Fork 68
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
Errors not properly reported in worker mode #96
Comments
@nex3 I'm not at all familiar with dart2js; is there a way to make it emit a real |
According to dart-lang/sdk#27315, the Dart team seems to have some plans (maybe "vague desires" is more accurate) to have Currently |
That seems straightforward enough- seems like something @alexeagle or @josephperrott might take a look into on our side |
Currently the `run_` method, exposed through the `dart.sass.js` file, returns a `Future`. The `Future` object is not accessible due to the Dart compilation process and `Future` not being a thing in the JavaScript/NodeJS platform. In order to provide a better interface to the Sass API for JavaScript/NodeJS consumers, a native `Promise` is now returned. Fixes bazelbuild/rules_sass#96.
Currently the `run_` method, exposed through the `dart.sass.js` file, returns a `Future`. The `Future` object is not accessible due to the Dart compilation process and `Future` not being a thing in the JavaScript/NodeJS platform. In order to provide a better interface to the Sass API for JavaScript/NodeJS consumers, a native `Promise` is now returned. Fixes bazelbuild/rules_sass#96.
Updates `rules_sass` to the latest version that contains: bazelbuild/rules_sass@dd0079b. This fixes that errors are reported silently and only shown once the CSS file is served in the browser. It still means that the message might not be printed in the terminal, since there is still bazelbuild/rules_sass#96, but it's better seeing that something failed at compilation time.
Updates `rules_sass` to the latest version that contains: bazelbuild/rules_sass@dd0079b. This fixes that errors are reported silently and only shown once the CSS file is served in the browser. It still means that the message might not be printed in the terminal, since there is still bazelbuild/rules_sass#96, but it's better seeing that something failed at compilation time.
Is this on the roadmap to be fixed? /* Error: expected ";".
* ,
* 3 | @include cdk-overlay
* | ^
* '
* src/ui/tooltip/cs-tooltip.component.scss 3:21 root stylesheet */
body::before {
font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",
"Droid Sans Mono", monospace, monospace;
white-space: pre;
display: block;
padding: 1em;
margin-bottom: 1em;
border-bottom: 2px solid black;
content: 'Error: expected ";".\a \2577 \a 3 \2502 @include cdk-overlay\a \2502 ^\a \2575 \a src/ui/tooltip/cs-tooltip.component.scss 3:21 root stylesheet';
} |
Updates `rules_sass` to the latest version that contains: bazelbuild/rules_sass@dd0079b. This fixes that errors are reported silently and only shown once the CSS file is served in the browser. It still means that the message might not be printed in the terminal, since there is still bazelbuild/rules_sass#96, but it's better seeing that something failed at compilation time.
Possible temporary workaround is to disable worker mode with |
If a sass compilation fails within a worker process, the failure is not reported back through the the worker protocol. This is because the asynchronous call to
sass.run_
is not properly awaited by@bazel/worker
.This seems to be because
sass.run_
does not implement a JavaScript promise, but rather uses theFuture_
construct (which seems to be a thing in the converted JS code only).The
Future_
has the following properties but I'm not sure if it would make sense to rely on one of those (no type-safety).I'm not too familiar with Dart, but just wanted to submit this issue. Happy to submit a PR if we have a solution (even it is just is using
then$1
to create a JS promise.The text was updated successfully, but these errors were encountered: