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

[dart2js] default to sound null safe mode #50345

Closed
2 tasks done
sigmundch opened this issue Oct 31, 2022 · 6 comments
Closed
2 tasks done

[dart2js] default to sound null safe mode #50345

sigmundch opened this issue Oct 31, 2022 · 6 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js
Milestone

Comments

@sigmundch
Copy link
Member

sigmundch commented Oct 31, 2022

Today dart2js autodetects the mode based on the entrypoint.

  • Milestone 1: Starting Dart 3.alpha, dart2js should compile in sound mode by default and provide an error if the application contains files not migrated to null safety.
  • Milestone 2: In Dart 3.beta, the unsound flag will be exposed selectively. It will be available if an SDK build supports it (this will be determined by an SDK build flag that doesn't exist yet, potentially could be something like --enable-sound-mode)
@sigmundch sigmundch added P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Oct 31, 2022
@sigmundch sigmundch added this to the Dart 3 alpha milestone Oct 31, 2022
@mit-mit
Copy link
Member

mit-mit commented Dec 12, 2022

@sigmundch is there anything remaining for alpha?

@sigmundch
Copy link
Member Author

Alpha changes are complete, thanks!

@itsjustkevin
Copy link
Contributor

@sigmundch with the approach we are taking with the flag, is this work still necessary for the release?

@sigmundch
Copy link
Member Author

We are still planning to make this change.

We default to sound null safety in dart2js, but the option of using --no-sound-null-safety is still available. We would like to make that an error. @nshahan has a change in progress to make that happen.

@nshahan
Copy link
Contributor

nshahan commented Mar 27, 2023

Update:

@sigmundch
Copy link
Member Author

Nick's changes landed with 7c0e4d6, this is now complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants