Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

--sound-null-safety instead of enable-experiment where possible #26999

Merged
merged 5 commits into from
Jun 29, 2021

Conversation

dnfield
Copy link
Contributor

@dnfield dnfield commented Jun 28, 2021

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.

@dnfield dnfield requested review from yjbanov and jonahwilliams June 28, 2021 05:08
@flutter-dashboard flutter-dashboard bot added platform-fuchsia platform-web Code specifically for the web engine labels Jun 28, 2021
@google-cla google-cla bot added the cla: yes label Jun 28, 2021
@@ -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",
Copy link
Contributor Author

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.

Copy link
Contributor Author

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)

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fails how?

Copy link
Contributor Author

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'.

Copy link
Contributor Author

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)

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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',
Copy link
Contributor Author

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.

@dnfield dnfield requested a review from chaselatta June 28, 2021 16:51
Copy link
Contributor

@yjbanov yjbanov left a 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",
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@dnfield dnfield added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jun 29, 2021
@fluttergithubbot fluttergithubbot merged commit 3283caf into flutter:master Jun 29, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 30, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 30, 2021
dnfield added a commit that referenced this pull request Jun 30, 2021
dnfield added a commit that referenced this pull request Jun 30, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 30, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 30, 2021
bdero pushed a commit to flutter/flutter that referenced this pull request Jun 30, 2021
* 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)
moffatman pushed a commit to moffatman/engine that referenced this pull request Aug 5, 2021
moffatman pushed a commit to moffatman/engine that referenced this pull request Aug 5, 2021
naudzghebre pushed a commit to naudzghebre/engine that referenced this pull request Sep 2, 2021
naudzghebre pushed a commit to naudzghebre/engine that referenced this pull request Sep 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes platform-fuchsia platform-web Code specifically for the web engine waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants