-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dart 2.8.0-dev.17.0 breaks Dart Sass Node.js tests #41259
Comments
Culprit[1] is https://dart-review.googlesource.com/c/sdk/+/140042 by @johnniwinther. This changed how This makes sense as the error relates to [1] found by bisecting through SDK changes in range 41fa72e..e3af7e7 which corresponds to dev.16.0 to dev.17.0: git checkout <revision> && git clean -ffd && gclient sync -D --force --reset && ./tools/build.py --mode release --arch x64 create_sdk |
Unfortunately manually implementing @JS()
class NodeSassNullClass implements Function {
external Object call();
external NodeSassNull get NULL;
}
@JS()
class NodeSassNull {
external Constructor get constructor;
} |
@sigmundch @fishythefish Is this related to the problem you found with js-interop and |
@nex3 TL;DR - I believe a quick fix on your end would be to remove the @johnniwinther I think it's a different issue. It appears that removing Consider this example: class B implements Function {
void call() {}
}
m1(Function f) => m2(f);
m2(f) => print(
'arg: $f\n'
'type: ${f.runtimeType}\n'
'is function: ${(f as dynamic) is Function}');
main() {
m1(B());
m2(B());
} Before the change, this would print twice:
After the change, the call to
(Note: this is also the case on other backends) The new behavior is what was specified back in 2.0.0, which is that implementing Function was supposed to have no effect whatsoever. Nevertheless, this bug fix is a breaking change so we should decide whether to move forward with it and, if so, send out a breaking change announcement about it. My inclination is that we do release it. |
I assumed that the fix only had impact on backends that (mis)used the references to |
Unfortunately this doesn't work because the |
quick update: we discussed this more broadly and are going to move ahead with the breaking change. We'll send out a proper announcement soon. @nex3 I tried the suggestion above and it allows the test to pass. However, I believe it is not enough. I didn't notice earlier that the utility method calls js_utils's instanceof, which is also typed to receive a I believe it is a mistake that such API expects a Dart I think we need to relax the API in js-util. Until we do so, maybe the immediate fix for your test would be to add a copy of |
Sorry I had the tab open since yesterday and I had not seen your response until after I replied. Seems you had encountered the same issue. I sent out a change to fix |
Since JavaScript constructor functions are not valid Dart functions, they should not be expected to have a Function type. For context see: #41259 Change-Id: I9092700ad60712f604cec7e5cf0189b23024839a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142321 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Sigmund Cherem <[email protected]>
Please let me know once this change makes it into a dev release. |
Sure thing! Merge request is tracked at #41326 |
Since JavaScript constructor functions are not valid Dart functions, they should not be expected to have a Function type. For context see: #41259 Change-Id: I9092700ad60712f604cec7e5cf0189b23024839a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142321 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Sigmund Cherem <[email protected]>
This needs a release because the release process for 1.26.4 was broken by dart-lang/sdk#41259.
This needs a release because the release process for 1.26.4 was broken by dart-lang/sdk#41259.
I haven't had time to dive in and find a minimal reproduction, but Dart Sass's Node.js tests started failing with the release of Dart 2.8.0-dev.17.0 with errors like the following:
See this Travis job for an example of the failure, and this Travis job for an example of a successful run with Dart 2.8.0-dev.16.0.
To reproduce:
You can inspect the generated JS code in
build/npm/sass.dart.js
and regenerate it withpub run grinder pkg-js-dev
.This is blocking Dart Sass's release process.
The text was updated successfully, but these errors were encountered: