-
Notifications
You must be signed in to change notification settings - Fork 6k
--sound-null-safety instead of enable-experiment where possible #26999
Conversation
lib/snapshot/BUILD.gn
Outdated
@@ -256,7 +256,6 @@ compile_platform("strong_platform") { | |||
is_runtime_mode_release = | |||
flutter_runtime_mode == "release" || flutter_runtime_mode == "jit_release" | |||
args = [ | |||
"--enable-experiment=non-nullable", |
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.
@jonahwilliams - adding --sound-null-safety
fails here, but otherwise I think this works? I'm hoping you'll know if this is safe or not.
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.
(same comment for the similar Fuchsia related targets for dart_runner and flutter)
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.
Fuchsia currently does not have anything in the engine repo that compiles dart code. All of our tests are c++ unit tests and the targets are leftovers from when we moved out of topaz. We are in the process of adding some dart tests and there are some WIP cls that remove the old targets. I'll make sure that those get moved to sound null safety when they are added.
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.
This is building the platform snapshot, not a test.
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.
fails how?
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.
Like this:
FAILED: clang_x64/flutter_runner_patched_sdk/platform_strong.dill clang_x64/flutter_runner_patched_sdk/vm_outline_strong.dill
python ../../third_party/dart/build/gn_run_binary.py compiled_action /b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/dart -Dsdk_hash=d2025958e3 --packages=/b/s/w/ir/cache/builder/src/third_party/dart/.packages --dfe=/b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/snapshots/kernel-service.dart.snapshot /b/s/w/ir/cache/builder/src/third_party/dart/pkg/front_end/tool/_fasta/compile_platform.dart --sound-null-safety --nnbd-agnostic --target=flutter_runner dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=/b/s/w/ir/cache/builder/src/ org-dartlang-sdk:///flutter/shell/platform/fuchsia/flutter/kernel/libraries.json clang_x64/vm_outline_strong.dill clang_x64/flutter_runner_patched_sdk/platform_strong.dill clang_x64/flutter_runner_patched_sdk/vm_outline_strong.dill
Command failed: /b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/dart -Dsdk_hash=d2025958e3 --packages=/b/s/w/ir/cache/builder/src/third_party/dart/.packages --dfe=/b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/snapshots/kernel-service.dart.snapshot /b/s/w/ir/cache/builder/src/third_party/dart/pkg/front_end/tool/_fasta/compile_platform.dart --sound-null-safety --nnbd-agnostic --target=flutter_runner dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=/b/s/w/ir/cache/builder/src/ org-dartlang-sdk:///flutter/shell/platform/fuchsia/flutter/kernel/libraries.json clang_x64/vm_outline_strong.dill clang_x64/flutter_runner_patched_sdk/platform_strong.dill clang_x64/flutter_runner_patched_sdk/vm_outline_strong.dill
output: Usage: compile_platform [options] dart-library-uri libraries.json vm_outline_strong.dill platform.dill outline.dill
Compiles Dart SDK platform to the Dill/Kernel IR format.
Frequently used options:
-o <file> Generate the output into <file>.
-h Display this message (add -v for information about all options).
Error: Unknown option '--sound-null-safety'.
[6735/7165] ACTION //flutter/shell/platform/fuchsia/flutter/kernel:kernel_platform_files(//build/toolchain/fuchsia:fuchsia)
FAILED: flutter_runner_patched_sdk/platform_strong.dill flutter_runner_patched_sdk/vm_outline_strong.dill
python ../../third_party/dart/build/gn_run_binary.py compiled_action /b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/dart -Dsdk_hash=d2025958e3 --packages=/b/s/w/ir/cache/builder/src/third_party/dart/.packages --dfe=/b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/snapshots/kernel-service.dart.snapshot /b/s/w/ir/cache/builder/src/third_party/dart/pkg/front_end/tool/_fasta/compile_platform.dart --sound-null-safety --nnbd-agnostic --target=flutter_runner dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=/b/s/w/ir/cache/builder/src/ org-dartlang-sdk:///flutter/shell/platform/fuchsia/flutter/kernel/libraries.json vm_outline_strong.dill flutter_runner_patched_sdk/platform_strong.dill flutter_runner_patched_sdk/vm_outline_strong.dill
Command failed: /b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/dart -Dsdk_hash=d2025958e3 --packages=/b/s/w/ir/cache/builder/src/third_party/dart/.packages --dfe=/b/s/w/ir/cache/builder/src/third_party/dart/tools/sdks/dart-sdk/bin/snapshots/kernel-service.dart.snapshot /b/s/w/ir/cache/builder/src/third_party/dart/pkg/front_end/tool/_fasta/compile_platform.dart --sound-null-safety --nnbd-agnostic --target=flutter_runner dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=/b/s/w/ir/cache/builder/src/ org-dartlang-sdk:///flutter/shell/platform/fuchsia/flutter/kernel/libraries.json vm_outline_strong.dill flutter_runner_patched_sdk/platform_strong.dill flutter_runner_patched_sdk/vm_outline_strong.dill
output: Usage: compile_platform [options] dart-library-uri libraries.json vm_outline_strong.dill platform.dill outline.dill
Compiles Dart SDK platform to the Dill/Kernel IR format.
Frequently used options:
-o <file> Generate the output into <file>.
-h Display this message (add -v for information about all options).
Error: Unknown option '--sound-null-safety'.
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.
(that's the fuchsia failure but the one here was the same)
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.
Oh gotcha, I forgot about that. Is this failing because we are passing in a .packages file instead of a package_config.json?
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.
It seems like Dart just doesn't like that argument there.
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.
I'm going to split this one line into a separate patch and land the rest.
@@ -221,8 +221,7 @@ def SnapshotTest(build_dir, test_packages, dart_file, kernel_file_output, verbos | |||
dart, | |||
'--disable-dart-dev', | |||
frontend_server, | |||
'--enable-experiment=non-nullable', | |||
'--no-sound-null-safety', | |||
'--sound-null-safety', |
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.
VM tests are all migrated, this will fail on CI if there is any mistake.
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.
LGTM if LGT @jonahwilliams
web_sdk/BUILD.gn
Outdated
@@ -487,7 +487,7 @@ prebuilt_dart_action("flutter_dartdevc_kernel_sdk_outline_sound") { | |||
script = "//third_party/dart/utils/bazel/kernel_worker.dart" | |||
|
|||
args = [ | |||
"--enable-experiment=non-nullable", | |||
"--sound-null-safety", | |||
"--sound-null-safety", |
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.
Nit: Duplicate --sound-null-safety
on 4 hunks in this file
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.
Fixed
* 36a247f Temporarily opt out of reduced shaders variants till roll issues are resolved. (flutter/engine#27048) * b06ff83 [web] Render RTL text correctly (flutter/engine#26811) * 3283caf --sound-null-safety instead of enable-experiment where possible (flutter/engine#26999) * e10490d Roll Fuchsia Linux SDK from qq5J5tHIA... to eMHAbJpmO... (flutter/engine#27049) * 15ed6a0 Removes the licence sheck from cirrus (flutter/engine#27051) * 6d8a01a Roll Skia from 62ce2488f744 to c6804edbaefc (4 revisions) (flutter/engine#27050) * e8339ed Fix use-after-free. (flutter/engine#27053) * ecd4a14 Roll Dart SDK from 5103185fdff6 to 9d7c40ba84c4 (1 revision) (flutter/engine#27054) * 2e86f4b Roll Skia from c6804edbaefc to 55b401ed9e6c (1 revision) (flutter/engine#27055) * 6136cbd Give FlutterView a view ID (flutter/engine#27052) * 05fe2e2 Revert "--sound-null-safety instead of enable-experiment where possible (#26999)" (flutter/engine#27059) * c633b2a Roll Dart SDK from 9d7c40ba84c4 to d01a840fa25b (1 revision) (flutter/engine#27058)
…le (flutter#26999)" (flutter#27059) This reverts commit 3283caf.
…le (flutter#26999)" (flutter#27059) This reverts commit 3283caf.
It's not an experiment anymore.
This still leaves one instance of the --enable-experiment flag for building web tests, which aren't fully migrated yet AFAICT.