-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Interop extension type object literal constructors are not lowered without an @JS
annotation on the library
#54801
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
Labels
area-web-js
Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
web-dart2js
web-js-interop
Issues that impact all js interop
Comments
srujzs
added a commit
to srujzs/web
that referenced
this issue
Feb 1, 2024
This is needed to work around dart-lang/sdk#54801. When that issue is fixed, these declarations can be removed.
srujzs
added a commit
to dart-lang/web
that referenced
this issue
Feb 2, 2024
* Generate library declarations with @js annotations This is needed to work around dart-lang/sdk#54801. When that issue is fixed, these declarations can be removed. * Remove library name
This was referenced Feb 26, 2024
Closed
srujzs
added a commit
to srujzs/packages
that referenced
this issue
Feb 28, 2024
These are needed for 3.3 in order to address issue dart-lang/sdk#54801. This commit also cleans up some unnecessary annotations.
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this issue
Feb 28, 2024
These are needed for 3.3 in order to address issue dart-lang/sdk#54801. This commit also cleans up some unnecessary annotations. Also publishes 0.5.7. dart-lang/sdk#55039
copybara-service bot
pushed a commit
that referenced
this issue
Mar 4, 2024
annotation Fixes #54801 Object literal constructors need to be explicitly handled when determining a member is JS interop or not in dart2js as it does not require any @js annotations. Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/349840 Cherry-pick-request: #55057 Change-Id: Ie178e29f8c4f5b032440b58c08eb81cf896bad70 Bug: #54801 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355060 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]>
LouiseHsu
pushed a commit
to LouiseHsu/packages
that referenced
this issue
Mar 7, 2024
These are needed for 3.3 in order to address issue dart-lang/sdk#54801. This commit also cleans up some unnecessary annotations. Also publishes 0.5.7. dart-lang/sdk#55039
1 task
arc-yong
pushed a commit
to Arctuition/packages-arc
that referenced
this issue
Jun 14, 2024
These are needed for 3.3 in order to address issue dart-lang/sdk#54801. This commit also cleans up some unnecessary annotations. Also publishes 0.5.7. dart-lang/sdk#55039
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-web-js
Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
web-dart2js
web-js-interop
Issues that impact all js interop
results in:
because dart2js doesn't recognize the constructor as a JS interop member.
Adding an
@JS
annotation onto the library tells dart2js it's meant to be an interop member e.g.DDC doesn't come across this issue because it assumes all
external
, extension type members with named parameters are object literal constructors. We can make this same assumption in dart2js as a fix, but long-term, we should have a more robust lowering here. With extension types, we use the representation type to determine if a type is an interop type. However, this information requires indexing all the extension types and their members, which is expensive, so we don't do this in the backends. Ideally, we'd be able to construct the literal in the transformers (where we already do the indexing) before we get to the backend, but this isn't possible today as we don't have a lowering to create an arbitrary object with keys and values in JS.The text was updated successfully, but these errors were encountered: