-
Notifications
You must be signed in to change notification settings - Fork 6k
[fuchsia] NNBD: Kernel libraries for Flutter, Dart runners #18714
Conversation
This updates the references to `third_party/dart/sdk` to `third_party/dart/sdk_nnbd` Fixes: flutter/flutter#58431
a-siva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options to build the platform file also need to be changed, see usage of option
--enable-experiment=non-nullable and --nnbd-weak in lib/snapshot/BUILD.gn
In addition to these changes, we need to make sure if the following
Fuchsia libraries need to opt-in to non-nullability
dart:zircon (flutter/shell/platform/fuchsia/dart-pkg/zircon/lib/zircon.dart)
dart:fuschia (flutter/shell/platform/fuchsia/dart-pkg/fuchsia/lib/fuchsia.dart)
dart:fuchsia-builtin (flutter/shell/platform/fuchsia/dart_runner/embedder/builtin.dart)
If you encouter errors while building after turning on the --enable-experiment option
in these files it is probably a good idea to opt out these files until they can be ported over
for non-nullability.
See flutter/lib/ui/ui.dart for syntax on opting out
// @Dart = 2.6
aam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for quick action on this!
This CL embeds the sdk_nnbd/lib/_internal/allowed_experiments.json into the CFE and uses this to allow experiments enabled on a per library basis. The file is embedded through generated code to avoid reliance on access to the file itself. A presubmit check is also added to ensure that the json file and the generated code are in sync. This work is in preparation for #41538 This was reverted in https://dart-review.googlesource.com/c/sdk/+/149620 because flutter wasn't prepared for auto-enabling nnbd in dart:* libraries. This has now been fixed in flutter/engine#18714 Closes #42162 Change-Id: I686ed6feaef8ee066b426068fe2a0f5080bf1713 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149588 Reviewed-by: Jens Johansen <[email protected]> Commit-Queue: Johnni Winther <[email protected]>
This updates the references to
third_party/dart/sdktothird_party/dart/sdk_nnbdFixes: flutter/flutter#58431