Skip to content

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

Closed
@sigmundch

Description

@sigmundch

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dart2js

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions