Skip to content

[dart2js] make it an error to use the dart2js snapshot outside "dart compile js" #51695

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

Closed
1 of 2 tasks
sigmundch opened this issue Mar 9, 2023 · 2 comments
Closed
1 of 2 tasks
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop web-dart2js

Comments

@sigmundch
Copy link
Member

sigmundch commented Mar 9, 2023

Today, the dart2js gives a warning when invoked in an unsupported context, like outside the dart cli and internal build systems. Since #46100 developers are expected to invoke dart2js via "dart compile js".

The only way to invoke dart2js outside the standard way is to directly access its snapshot (which is not in an advertised location of the SDK). Only internal build systems and the flutter tool do this today.

We would like to make it an error to invoke the snapshot directly, except for those counted supported cases.

To do so, we need to:

@sigmundch sigmundch added web-dart2js area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop labels Mar 9, 2023
@sigmundch
Copy link
Member Author

@mit-mit - any concerns in making this happen by Dart 3.0? Any additional communication needed? Technically this is would be a new error, but we don't consider this a breaking change because the snapshot is hidden since the breaking changes in #46100 (made in 69249df, which went out in Dart 2.8)

@mit-mit
Copy link
Member

mit-mit commented Mar 10, 2023

No concerns, and I do not think additional comms are needed.

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
Projects
None yet
Development

No branches or pull requests

2 participants