Skip to content
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

dart compile should have an option to use ddc (Dart Development Compiler) #56877

Open
a-siva opened this issue Oct 9, 2024 · 2 comments
Open
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. type-enhancement A request for a change that isn't a bug

Comments

@a-siva
Copy link
Contributor

a-siva commented Oct 9, 2024

The 'compile' command in dart cli uses the production compiler dart2js to compile Dart files to JS when the 'js' option is used.
TO be consistent we need another option to allow users to specify that ddc the dart Development Compiler should be used to generate the JS file.

// cc @bkonyi

@a-siva a-siva added type-enhancement A request for a change that isn't a bug area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. labels Oct 9, 2024
@a-siva
Copy link
Contributor Author

a-siva commented Oct 9, 2024

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.

@natebosch
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants