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

DDC has no compile time null safety mode flag #41694

Closed
nshahan opened this issue Apr 28, 2020 · 5 comments
Closed

DDC has no compile time null safety mode flag #41694

nshahan opened this issue Apr 28, 2020 · 5 comments
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. NNBD Issues related to NNBD Release web-dev-compiler

Comments

@nshahan
Copy link
Contributor

nshahan commented Apr 28, 2020

DDC has been relying on a runtime mode flag for null safety that gets set by all the build/test systems and bootstrapping logic but isn't using any flag for compile time.

DDC doesn't need this information itself but should pass the mode along to the CFE to ensure correct compile time semantics are enforced.

The CFE defaults to weak mode. Other backends are using the flag --null-safety to signal the strong/strict null safety mode.

@nshahan nshahan added web-dev-compiler area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. NNBD Issues related to NNBD Release labels Apr 28, 2020
@leafpetersen
Copy link
Member

Note that @mit-mit recently filed an issue to change the name of the null safety flag, so if you're visiting that code consider folding that work into it. :)

@mit-mit
Copy link
Member

mit-mit commented May 1, 2020

#41497

@rileyporter
Copy link
Contributor

dart-bot pushed a commit that referenced this issue May 26, 2020
Cleanup workaround to avoid compiling packages leftover from before
the unfork of the SDK.

The collection package is still used by one regression test. We could
rewrite the test in the future to avoid using the package but for now
collection will get compiled into the module with the test itself.

The other packages get used in tests that are skipped by DDC.

Change-Id: I5bbe24e98e3f4bf5d75f557fefb05cbee54c46f2
Issue: #41694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148281
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
@mit-mit
Copy link
Member

mit-mit commented May 27, 2020

@nshahan any news on this one? Is this on track for completion this week?

dart-bot pushed a commit that referenced this issue May 27, 2020
Validates that the .dill files provided for dependencies and the SDK
support sound null safety when compiling for strong mode.

Change-Id: Id1f7547a6bc473b901bfce62145cc918353c8ea4
Issue: #41694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149080
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
@nshahan
Copy link
Contributor Author

nshahan commented May 27, 2020

@mit-mit I should be landing the necessary bits today.
https://dart-review.googlesource.com/c/sdk/+/146962
https://dart-review.googlesource.com/c/sdk/+/149080

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. NNBD Issues related to NNBD Release web-dev-compiler
Projects
None yet
Development

No branches or pull requests

4 participants