Open a-siva opened 1 month ago
Adding comment from @nshahan here
we don't really expect end users to run DDC outside of a build system, but it would be nice to shield ourselves from extra work when we make changes like this. Depending on how the flag piping is implemented in the cli we could add a hidden flag like dart compile js --js-dev-unsupported-compiler
and parse it in the cli but pass the rest of the flags through to the compilers.
The main reason we needed DDC out of the public API for the SDK was to allow changes to it's arguments and requirements without a breaking SDK change. Things might be more stable now, but we also don't plan to document it's behavior in a way that would make it useful to typical customers of the SDK. I think hiding it behind a flag that we don't advertise and includes "unsupported" or similar wording is a good idea and mitigates the concerns I have exposing it.
The '
compile
' command in dart cli uses the production compilerdart2js
to compile Dart files to JS when the 'js
' option is used. TO be consistent we need another option to allow users to specify thatddc
the dart Development Compiler should be used to generate the JS file.// cc @bkonyi