[dart2js] make it an error to use the dart2js snapshot outside "dart compile js" #51695
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
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:
--invoker
flag (which marks flutter tools as an allowed entrypoint) or to usedart compile js
instead.--invoker
flag is missing.The text was updated successfully, but these errors were encountered: