-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Dart2+JS Interop: Discrepancies in support/cast errors #33129
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
Comments
/cc @jmesserly @vsmenon @sigmundch as this hit an escalation internally. |
@jacob314 @jmesserly @sigmundch @rakudrama - what do you all think is the right behavior here? I believe we're effectively treating the generic as unreified / Dart-1 ish in DDC. |
I added this to #32929 To my knowledge there is no spec for JS interop, nor errors for incorrect usage. DDC can go pretty far off the rails in some cases, and that's not even getting into DDC/dart2js differences. |
@matanlurey - what version of dart2js was used here? This seems to be the same as #32929 (I discovered the issue also running this in an internal app with a very similar error message, possibly the same). We landed a fix in dart2js in 54b8ebd which is avalable in -dev.52 onwards. |
The latest internally (was hit yesterday).
…On Tue, May 15, 2018, 11:25 AM sigmundch ***@***.***> wrote:
@matanlurey <https://github.com/matanlurey> - what version of dart2js was
used here.
This seems to be the same as #32929
<#32929> (I discovered the issue
also running this in an internal app with a very similar error message,
possibly the same). We landed a fix in dart2js in 54b8ebd
<54b8ebd>
which is avalable in -dev.52 onwards.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33129 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKQ7msO_Qwmqs-MeFo4_LxsoevCVPPhks5tyx2egaJpZM4T__6h>
.
|
I'm a bit puzzled, "--preview-dart-2" is not enabled internally yet, let's chat offline when you have a chance to better understand what's happening here. |
Talked offline with @sigmundch, this occurs in Dart1-mode. The |
My inclination is that yes: I hope we can skip fixing this in dart2js-dart1 mode and avoid the problem until projects switch to use dart2. |
Great. I'm happy to close this (though I think #32929 will cover "spec" issues and hopefully avoid more of these in the future). |
Lowering priority to P2. @sigmundch feel free to close if needed. |
Thanks @matanlurey, I'll close this as not-planned, but please do reopen or ping me if this becomes a pain point and we need to reevaluate. |
(I consider this a HIGH/P1 issue due to production bugs hit by internal teams)
Both internal and external users have been suffering a bit due to the lack of (a) clear documentation of intended use of
package:js
and (b) slightly different runtime and compile-time errors and functionality. In one particular recent case, DDC worked fine, and our internal clients hit production bugs requiring multiple cherrypicks because Dart2JS threw exceptions (at runtime).Here is a reproduction case of a production P0:
https://github.com/matanlurey/dart2_js_interop_casts
With DDC:
With Dart2JS:
(I know there are some meta issues around generic types/JS interop already)
The text was updated successfully, but these errors were encountered: