[S] Change in dart/sdk[main]: [ddc] Add dart.web.assertions_enabled environment variable.

1 view
Skip to first unread message

Mayank Patke (Gerrit)

unread,
Dec 1, 2022, 7:09:38 PM12/1/22
to dart-dc-te...@google.com, rev...@dartlang.org, Sigmund Cherem, Nicholas Shahan, Anna Gringauze, CBuild, Commit Queue

Attention is currently required from: Mayank Patke, Sigmund Cherem.

View Change

1 comment:

  • Patchset:

    • Patch Set #3:

      It looks like the expression compiler has assertions disabled right now, but I tried to set it up in anticipation of assertion support. Let me know if I missed anything or if there's a better way to structure this. The expression compiler infrastructure seems to do raw argument parsing in multiple places and doesn't actually construct a SharedCompilerOptions until it gets a request, so I'm not sure where it's best to do the plumbing.

To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
Gerrit-Change-Number: 273284
Gerrit-PatchSet: 3
Gerrit-Owner: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-CC: Anna Gringauze <anna...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-Attention: Mayank Patke <fishyt...@google.com>
Gerrit-Attention: Sigmund Cherem <sig...@google.com>
Gerrit-Comment-Date: Fri, 02 Dec 2022 00:09:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Mayank Patke (Gerrit)

unread,
Dec 1, 2022, 7:09:38 PM12/1/22
to Sigmund Cherem, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze

Attention is currently required from: Mayank Patke, Sigmund Cherem.

Mayank Patke would like Sigmund Cherem to review this change.

View Change

[ddc] Add dart.web.assertions_enabled environment variable.

Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
---
M pkg/dev_compiler/lib/src/kernel/command.dart
M pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
M pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
M pkg/dev_compiler/test/nullable_inference_test.dart
M pkg/dev_compiler/test/shared_test_options.dart
5 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index e0a61f3..60cc9c7 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -157,6 +157,8 @@
}

var options = SharedCompilerOptions.fromArguments(argResults);
+ addGeneratedVariables(declaredVariables,
+ enableAsserts: options.enableAsserts);

// To make the output .dill agnostic of the current working directory,
// we use a custom-uri scheme for all app URIs (these are files outside the
@@ -837,6 +839,13 @@
return declaredVariables;
}

+/// Adds all synthesized environment variables to [variables].
+Map<String, String> addGeneratedVariables(Map<String, String> variables,
+ {required bool enableAsserts}) {
+ variables['dart.web.assertions_enabled'] = '$enableAsserts';
+ return variables;
+}
+
/// The default path of the kernel summary for the Dart SDK given the
/// [soundNullSafety] mode.
String defaultSdkSummaryPath({required bool soundNullSafety}) {
diff --git a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
index ccfcad5..ee37557 100644
--- a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
+++ b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
@@ -230,9 +230,13 @@
TargetFlags(trackWidgetCreation: trackWidgetCreation))
..fileSystem = fileSystem
..omitPlatform = true
- ..environmentDefines = {
+ ..environmentDefines = addGeneratedVariables({
if (environmentDefines != null) ...environmentDefines,
- }
+ },
+ // Disable asserts due to failures to load source and
+ // locations on kernel loaded from dill files in DDC.
+ // https://github.com/dart-lang/sdk/issues/43986
+ enableAsserts: false)
..explicitExperimentalFlags = explicitExperimentalFlags
..onDiagnostic = _onDiagnosticHandler(errors, warnings, infos)
..nnbdMode = soundNullSafety ? NnbdMode.Strong : NnbdMode.Weak
diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
index 3941227..ec1581f 100644
--- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
+++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
@@ -77,7 +77,11 @@
..omitPlatform = true
..sdkSummary =
p.toUri(soundNullSafety ? sdkSoundSummaryPath : sdkUnsoundSummaryPath)
- ..environmentDefines = const {}
+ ..environmentDefines = addGeneratedVariables({},
+ // Disable asserts due to failures to load source and
+ // locations on kernel loaded from dill files in DDC.
+ // https://github.com/dart-lang/sdk/issues/43986
+ enableAsserts: false)
..nnbdMode = soundNullSafety ? fe.NnbdMode.Strong : fe.NnbdMode.Weak;
return options;
}
diff --git a/pkg/dev_compiler/test/nullable_inference_test.dart b/pkg/dev_compiler/test/nullable_inference_test.dart
index b8ad050..0e0bf5c 100644
--- a/pkg/dev_compiler/test/nullable_inference_test.dart
+++ b/pkg/dev_compiler/test/nullable_inference_test.dart
@@ -6,7 +6,8 @@
import 'dart:convert' show jsonEncode;
import 'dart:io';

-import 'package:dev_compiler/src/kernel/command.dart' show getSdkPath;
+import 'package:dev_compiler/src/kernel/command.dart'
+ show addGeneratedVariables, getSdkPath;
import 'package:dev_compiler/src/kernel/js_typerep.dart';
import 'package:dev_compiler/src/kernel/nullable_inference.dart';
import 'package:dev_compiler/src/kernel/target.dart';
@@ -695,7 +696,7 @@
packagesUri, librariesUri, [], DevCompilerTarget(TargetFlags()),
fileSystem: _fileSystem,
explicitExperimentalFlags: const {},
- environmentDefines: const {},
+ environmentDefines: addGeneratedVariables({}, enableAsserts: true),
nnbdMode: fe.NnbdMode.Weak);
if (!identical(oldCompilerState, _compilerState)) inference = null;
var result =
diff --git a/pkg/dev_compiler/test/shared_test_options.dart b/pkg/dev_compiler/test/shared_test_options.dart
index 7d4478e..95abaad 100644
--- a/pkg/dev_compiler/test/shared_test_options.dart
+++ b/pkg/dev_compiler/test/shared_test_options.dart
@@ -4,7 +4,8 @@

import 'package:dev_compiler/src/compiler/module_builder.dart'
show ModuleFormat;
-import 'package:dev_compiler/src/kernel/command.dart' show getSdkPath;
+import 'package:dev_compiler/src/kernel/command.dart'
+ show addGeneratedVariables, getSdkPath;
import 'package:dev_compiler/src/kernel/target.dart' show DevCompilerTarget;
import 'package:front_end/src/api_unstable/ddc.dart';
import 'package:front_end/src/compute_platform_binaries_location.dart';
@@ -56,7 +57,7 @@
..omitPlatform = true
..sdkSummary = sdkRoot.resolve(
soundNullSafety ? sdkSoundSummaryPath : sdkUnsoundSummaryPath)
- ..environmentDefines = const {}
+ ..environmentDefines = addGeneratedVariables({}, enableAsserts: true)
..nnbdMode = soundNullSafety ? NnbdMode.Strong : NnbdMode.Weak;
return options;
}

To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
Gerrit-Change-Number: 273284
Gerrit-PatchSet: 3
Gerrit-Owner: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-CC: Anna Gringauze <anna...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-Attention: Mayank Patke <fishyt...@google.com>
Gerrit-Attention: Sigmund Cherem <sig...@google.com>
Gerrit-MessageType: newchange

Sigmund Cherem (Gerrit)

unread,
Dec 1, 2022, 7:52:27 PM12/1/22
to Mayank Patke, dart-dc-te...@google.com, rev...@dartlang.org, Sigmund Cherem, Nicholas Shahan, Anna Gringauze, CBuild, Commit Queue

Attention is currently required from: Mayank Patke.

Patch set 3:Code-Review +1

View Change

1 comment:

  • Patchset:

    • Patch Set #3:

      It looks like the expression compiler has assertions disabled right now, but I tried to set it up in […]

      Interesting... I'm surprised by this to be honest.

      I thought the expression compiler was using the kernel files that were generated during regular DDC compilation, which had assertions enabled in the first place.

      I wonder if this inconsistency could cause issues down the line (we are basically mixing .dill with different environment values as a result)?

      I wonder if Nick or Anna have any suggestions here. I'm OK to push forward as it is, but I it does seem surprising.

To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
Gerrit-Change-Number: 273284
Gerrit-PatchSet: 3
Gerrit-Owner: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-CC: Anna Gringauze <anna...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-Attention: Mayank Patke <fishyt...@google.com>
Gerrit-Comment-Date: Fri, 02 Dec 2022 00:52:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>
Gerrit-MessageType: comment

Mayank Patke (Gerrit)

unread,
Dec 2, 2022, 3:31:43 PM12/2/22
to Nicholas Shahan, Anna Gringauze, dart-dc-te...@google.com, rev...@dartlang.org, Sigmund Cherem

Attention is currently required from: Anna Gringauze, Nicholas Shahan.

Mayank Patke would like Nicholas Shahan and Anna Gringauze to review this change.

To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
Gerrit-Change-Number: 273284
Gerrit-PatchSet: 3
Gerrit-Owner: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-Attention: Nicholas Shahan <nsh...@google.com>
Gerrit-Attention: Anna Gringauze <anna...@google.com>
Gerrit-MessageType: newchange

Mayank Patke (Gerrit)

unread,
Dec 2, 2022, 3:31:44 PM12/2/22
to dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, CBuild, Commit Queue

Attention is currently required from: Anna Gringauze, Nicholas Shahan.

View Change

1 comment:

  • Patchset:

    • Patch Set #3:

      Nick, Anna: I'd love to hear your thoughts here, especially regarding the option handling in the expression compiler/expression compiler worker.

To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
Gerrit-Change-Number: 273284
Gerrit-PatchSet: 3
Gerrit-Owner: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-Attention: Nicholas Shahan <nsh...@google.com>
Gerrit-Attention: Anna Gringauze <anna...@google.com>
Gerrit-Comment-Date: Fri, 02 Dec 2022 20:31:40 +0000

Nicholas Shahan (Gerrit)

unread,
Dec 2, 2022, 5:39:27 PM12/2/22
to Mayank Patke, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Sigmund Cherem, CBuild, Commit Queue

Attention is currently required from: Anna Gringauze, Mayank Patke.

View Change

4 comments:

  • Patchset:

    • Patch Set #3:

      Do you think there are tests you could write for the various implementations so we can ensure the plumbing is all working?

    • Patch Set #3:

      Nick, Anna: I'd love to hear your thoughts here, especially regarding the option handling in the exp […]

      I vaguely remember a discussion about disabling assertions in the expression compiler but I don't remember all the details. I'll discuss on the linked issue in the comments where you had to disable the assertions.

  • File pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart:

    • Patch Set #3, Line 239: enableAsserts: false)

      Can we use a const or a variable here and later in the file for the value we use to enable assertions so that we are sure to change it consistently. I don't want to get confusing behavior in the future when we turn them back on and miss one.

  • File pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart:

    • Patch Set #3, Line 84: enableAsserts: false

      Here also, I'd like to be sure that when we create the options used to invoke the ProgramCompiler we use the same value to enable/disable assertions.

To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
Gerrit-Change-Number: 273284
Gerrit-PatchSet: 3
Gerrit-Owner: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-Attention: Mayank Patke <fishyt...@google.com>
Gerrit-Attention: Anna Gringauze <anna...@google.com>
Gerrit-Comment-Date: Fri, 02 Dec 2022 22:39:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

CBuild (Gerrit)

unread,
Feb 7, 2023, 10:57:27 AM2/7/23
to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, Commit Queue

Attention is currently required from: Mayank Patke.

go/dart-cbuild result: FAILURE (REGRESSIONS DETECTED)

Details: https://goto.google.com/dart-cbuild/find/092c45876c19af80ecfa154fa5aa03a954d9f643
Bugs: go/dart-cbuild-bug/092c45876c19af80ecfa154fa5aa03a954d9f643

View Change

    To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
    Gerrit-Change-Number: 273284
    Gerrit-PatchSet: 12
    Gerrit-Owner: Mayank Patke <fishyt...@google.com>
    Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
    Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
    Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Attention: Mayank Patke <fishyt...@google.com>
    Gerrit-Comment-Date: Tue, 07 Feb 2023 15:57:22 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    CBuild (Gerrit)

    unread,
    Feb 7, 2023, 3:56:39 PM2/7/23
    to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, Commit Queue

    Attention is currently required from: Mayank Patke.

    go/dart-cbuild result: SUCCESS

    Details: https://goto.google.com/dart-cbuild/find/aad7cba845f501bf00659558a8f299f2e088469f

    View Change

      To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
      Gerrit-Change-Number: 273284
      Gerrit-PatchSet: 13
      Gerrit-Owner: Mayank Patke <fishyt...@google.com>
      Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
      Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
      Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
      Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
      Gerrit-Attention: Mayank Patke <fishyt...@google.com>
      Gerrit-Comment-Date: Tue, 07 Feb 2023 20:56:35 +0000

      Mayank Patke (Gerrit)

      unread,
      Feb 7, 2023, 5:09:56 PM2/7/23
      to dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, CBuild, Commit Queue

      Attention is currently required from: Anna Gringauze, Nicholas Shahan, Sigmund Cherem.

      View Change

      3 comments:

      • Patchset:

        • Patch Set #3:

          Do you think there are tests you could write for the various implementations so we can ensure the pl […]

          I have end-to-end tests for dart2js and DDC in tests/web{,_2} as normal, but I'm not sure what the testing situation is for the expression compiler. Do you know if there are expression compiler tests and where they live?

      • File pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart:

        • Can we use a const or a variable here and later in the file for the value we use to enable assertion […]

          Done

      • File pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart:

        • Here also, I'd like to be sure that when we create the options used to invoke the ProgramCompiler we […]

          Done

      To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
      Gerrit-Change-Number: 273284
      Gerrit-PatchSet: 15
      Gerrit-Owner: Mayank Patke <fishyt...@google.com>
      Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
      Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
      Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
      Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
      Gerrit-Attention: Nicholas Shahan <nsh...@google.com>
      Gerrit-Attention: Sigmund Cherem <sig...@google.com>
      Gerrit-Attention: Anna Gringauze <anna...@google.com>
      Gerrit-Comment-Date: Tue, 07 Feb 2023 22:09:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Nicholas Shahan <nsh...@google.com>
      Gerrit-MessageType: comment

      CBuild (Gerrit)

      unread,
      Feb 7, 2023, 5:32:34 PM2/7/23
      to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, Commit Queue

      Attention is currently required from: Anna Gringauze, Nicholas Shahan, Sigmund Cherem.

      go/dart-cbuild result: SUCCESS

      Details: https://goto.google.com/dart-cbuild/find/af9754d8910aa7fd0a3d2471dd4aebd8dba6446c

      View Change

        To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
        Gerrit-Change-Number: 273284
        Gerrit-PatchSet: 15
        Gerrit-Owner: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
        Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
        Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
        Gerrit-Attention: Nicholas Shahan <nsh...@google.com>
        Gerrit-Attention: Sigmund Cherem <sig...@google.com>
        Gerrit-Attention: Anna Gringauze <anna...@google.com>
        Gerrit-Comment-Date: Tue, 07 Feb 2023 22:32:29 +0000

        Anna Gringauze (Gerrit)

        unread,
        Feb 7, 2023, 5:48:35 PM2/7/23
        to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Sigmund Cherem, CBuild, Commit Queue

        Attention is currently required from: Mayank Patke, Nicholas Shahan, Sigmund Cherem.

        View Change

        2 comments:

        • Patchset:

        • File pkg/dev_compiler/lib/src/kernel/command.dart:

          • Patch Set #15, Line 142: addGeneratedVariables(declaredVariables,

            Do we need to update anything in the frontend server's use of the program compiler? Probably need to make sure flutter bots work as well.

        To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
        Gerrit-Change-Number: 273284
        Gerrit-PatchSet: 15
        Gerrit-Owner: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
        Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
        Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
        Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
        Gerrit-Attention: Mayank Patke <fishyt...@google.com>
        Gerrit-Attention: Nicholas Shahan <nsh...@google.com>
        Gerrit-Attention: Sigmund Cherem <sig...@google.com>
        Gerrit-Comment-Date: Tue, 07 Feb 2023 22:48:28 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Gerrit-MessageType: comment

        CBuild (Gerrit)

        unread,
        Feb 7, 2023, 5:48:46 PM2/7/23
        to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, Commit Queue

        Attention is currently required from: Mayank Patke, Nicholas Shahan, Sigmund Cherem.

        go/dart-cbuild result: SUCCESS

        Details: https://goto.google.com/dart-cbuild/find/880e6ef5f89e993bfbdbb96cb3d59ca3dbcb579c

        View Change

          To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
          Gerrit-Change-Number: 273284
          Gerrit-PatchSet: 15
          Gerrit-Owner: Mayank Patke <fishyt...@google.com>
          Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
          Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
          Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
          Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
          Gerrit-Attention: Mayank Patke <fishyt...@google.com>
          Gerrit-Attention: Nicholas Shahan <nsh...@google.com>
          Gerrit-Attention: Sigmund Cherem <sig...@google.com>
          Gerrit-Comment-Date: Tue, 07 Feb 2023 22:48:41 +0000

          Mayank Patke (Gerrit)

          unread,
          Feb 7, 2023, 5:56:10 PM2/7/23
          to dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, CBuild, Commit Queue

          Attention is currently required from: Anna Gringauze, Nicholas Shahan, Sigmund Cherem.

          View Change

          1 comment:

          • File pkg/dev_compiler/lib/src/kernel/command.dart:

            • Do we need to update anything in the frontend server's use of the program compiler? Probably need to […]

              Siggi and I did discuss the possibility of changing the frontend server to plumb this through, but we settled on just using Blaze aspects. At the moment, we don't intend to advertise this variable publicly; it's just to support tree shaking of internal apps. If we decide that this would be useful externally/in flutter apps, then we could add it iteratively later.

              Siggi, WDYT?

          To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
          Gerrit-Change-Number: 273284
          Gerrit-PatchSet: 15
          Gerrit-Owner: Mayank Patke <fishyt...@google.com>
          Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
          Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
          Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
          Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
          Gerrit-Attention: Nicholas Shahan <nsh...@google.com>
          Gerrit-Attention: Sigmund Cherem <sig...@google.com>
          Gerrit-Attention: Anna Gringauze <anna...@google.com>
          Gerrit-Comment-Date: Tue, 07 Feb 2023 22:56:04 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Anna Gringauze <anna...@google.com>
          Gerrit-MessageType: comment

          Nicholas Shahan (Gerrit)

          unread,
          Feb 7, 2023, 6:47:42 PM2/7/23
          to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Sigmund Cherem, CBuild, Commit Queue

          Attention is currently required from: Anna Gringauze, Mayank Patke, Sigmund Cherem.

          Patch set 15:Code-Review +1

          View Change

            To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
            Gerrit-Change-Number: 273284
            Gerrit-PatchSet: 15
            Gerrit-Owner: Mayank Patke <fishyt...@google.com>
            Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
            Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
            Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
            Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
            Gerrit-Attention: Mayank Patke <fishyt...@google.com>
            Gerrit-Attention: Sigmund Cherem <sig...@google.com>
            Gerrit-Attention: Anna Gringauze <anna...@google.com>
            Gerrit-Comment-Date: Tue, 07 Feb 2023 23:47:34 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            Gerrit-MessageType: comment

            Sigmund Cherem (Gerrit)

            unread,
            Feb 7, 2023, 7:49:02 PM2/7/23
            to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Anna Gringauze, Sigmund Cherem, CBuild, Commit Queue

            Attention is currently required from: Anna Gringauze, Mayank Patke.

            Patch set 15:Code-Review +1

            View Change

            1 comment:

            • File pkg/dev_compiler/lib/src/kernel/command.dart:

              • Siggi and I did discuss the possibility of changing the frontend server to plumb this through, but w […]

                sgtm! thanks for checking

            To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
            Gerrit-Change-Number: 273284
            Gerrit-PatchSet: 15
            Gerrit-Owner: Mayank Patke <fishyt...@google.com>
            Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
            Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
            Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
            Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
            Gerrit-Attention: Mayank Patke <fishyt...@google.com>
            Gerrit-Attention: Anna Gringauze <anna...@google.com>
            Gerrit-Comment-Date: Wed, 08 Feb 2023 00:48:50 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>

            Anna Gringauze (Gerrit)

            unread,
            Feb 10, 2023, 7:28:36 PM2/10/23
            to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Nicholas Shahan, Sigmund Cherem, CBuild, Commit Queue

            Attention is currently required from: Mayank Patke, Sigmund Cherem.

            Patch set 15:Code-Review +1

            View Change

            1 comment:

            • File pkg/dev_compiler/lib/src/kernel/command.dart:

              • sgtm! thanks for checking

                Ack

            To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
            Gerrit-Change-Number: 273284
            Gerrit-PatchSet: 15
            Gerrit-Owner: Mayank Patke <fishyt...@google.com>
            Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
            Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
            Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
            Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
            Gerrit-Attention: Mayank Patke <fishyt...@google.com>
            Gerrit-Attention: Sigmund Cherem <sig...@google.com>
            Gerrit-Comment-Date: Sat, 11 Feb 2023 00:28:30 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>
            Comment-In-Reply-To: Sigmund Cherem <sig...@google.com>

            CBuild (Gerrit)

            unread,
            Feb 13, 2023, 5:53:10 PM2/13/23
            to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Nicholas Shahan, Sigmund Cherem, Commit Queue

            Attention is currently required from: Mayank Patke, Sigmund Cherem.

            go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)

            Details: https://goto.google.com/dart-cbuild/find/cd6034701795489116fc9c238067bd1ff45c9011

            View Change

              To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
              Gerrit-Change-Number: 273284
              Gerrit-PatchSet: 16
              Gerrit-Owner: Mayank Patke <fishyt...@google.com>
              Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
              Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
              Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
              Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
              Gerrit-Attention: Mayank Patke <fishyt...@google.com>
              Gerrit-Attention: Sigmund Cherem <sig...@google.com>
              Gerrit-Comment-Date: Mon, 13 Feb 2023 22:53:06 +0000

              Mayank Patke (Gerrit)

              unread,
              Feb 13, 2023, 7:15:18 PM2/13/23
              to dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Nicholas Shahan, Sigmund Cherem, CBuild, Commit Queue

              Attention is currently required from: Sigmund Cherem.

              View Change

              2 comments:

              • Patchset:

                • Patch Set #3:

                  I have end-to-end tests for dart2js and DDC in tests/web{,_2} as normal, but I'm not sure what the t […]

                  Done

                • Patch Set #3:

                  Interesting... I'm surprised by this to be honest. […]

                  Acknowledged

              To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
              Gerrit-Change-Number: 273284
              Gerrit-PatchSet: 17
              Gerrit-Owner: Mayank Patke <fishyt...@google.com>
              Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
              Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
              Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
              Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
              Gerrit-Attention: Sigmund Cherem <sig...@google.com>
              Gerrit-Comment-Date: Tue, 14 Feb 2023 00:15:12 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Mayank Patke <fishyt...@google.com>
              Comment-In-Reply-To: Nicholas Shahan <nsh...@google.com>
              Comment-In-Reply-To: Sigmund Cherem <sig...@google.com>
              Gerrit-MessageType: comment

              Mayank Patke (Gerrit)

              unread,
              Feb 13, 2023, 7:24:14 PM2/13/23
              to dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Nicholas Shahan, Sigmund Cherem, CBuild, Commit Queue

              Attention is currently required from: Mayank Patke, Sigmund Cherem.

              Patch set 18:Commit-Queue +2

              View Change

                To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: sdk
                Gerrit-Branch: main
                Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
                Gerrit-Change-Number: 273284
                Gerrit-PatchSet: 18
                Gerrit-Owner: Mayank Patke <fishyt...@google.com>
                Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
                Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
                Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
                Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                Gerrit-Attention: Mayank Patke <fishyt...@google.com>
                Gerrit-Attention: Sigmund Cherem <sig...@google.com>
                Gerrit-Comment-Date: Tue, 14 Feb 2023 00:24:10 +0000

                CBuild (Gerrit)

                unread,
                Feb 13, 2023, 7:43:59 PM2/13/23
                to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Nicholas Shahan, Sigmund Cherem, Commit Queue

                Attention is currently required from: Mayank Patke, Sigmund Cherem.

                go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)

                Details: https://goto.google.com/dart-cbuild/find/e41d4fa8e249b0fb3a880f687aec1ae2f0aa3162

                View Change

                  To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
                  Gerrit-Change-Number: 273284
                  Gerrit-PatchSet: 18
                  Gerrit-Owner: Mayank Patke <fishyt...@google.com>
                  Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
                  Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
                  Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
                  Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                  Gerrit-Attention: Mayank Patke <fishyt...@google.com>
                  Gerrit-Attention: Sigmund Cherem <sig...@google.com>
                  Gerrit-Comment-Date: Tue, 14 Feb 2023 00:43:54 +0000

                  Commit Queue (Gerrit)

                  unread,
                  Feb 13, 2023, 8:35:13 PM2/13/23
                  to Mayank Patke, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Nicholas Shahan, Sigmund Cherem, CBuild

                  Commit Queue submitted this change.

                  View Change



                  15 is the latest approved patch-set.
                  The change was submitted with unreviewed changes in the following files:

                  ```
                  The name of the file: pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart
                  Insertions: 45, Deletions: 0.

                  The diff is too large to show. Please review the diff.
                  ```
                  ```
                  The name of the file: pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
                  Insertions: 6, Deletions: 3.

                  The diff is too large to show. Please review the diff.
                  ```

                  Approvals: Sigmund Cherem: Looks good to me, approved Nicholas Shahan: Looks good to me, approved Anna Gringauze: Looks good to me, approved Mayank Patke: Commit
                  [ddc] Add dart.web.assertions_enabled environment variable.

                  Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
                  Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273284
                  Reviewed-by: Nicholas Shahan <nsh...@google.com>
                  Commit-Queue: Mayank Patke <fishyt...@google.com>
                  Reviewed-by: Sigmund Cherem <sig...@google.com>
                  Reviewed-by: Anna Gringauze <anna...@google.com>

                  ---
                  M pkg/dev_compiler/lib/src/kernel/command.dart
                  M pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
                  A pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart

                  M pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
                  M pkg/dev_compiler/test/nullable_inference_test.dart
                  M pkg/dev_compiler/test/shared_test_options.dart
                  M tests/web/assertions_disabled_test.dart
                  M tests/web_2/assertions_disabled_test.dart
                  8 files changed, 97 insertions(+), 14 deletions(-)

                  diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
                  index 8fb5b80..32afa73 100644
                  --- a/pkg/dev_compiler/lib/src/kernel/command.dart
                  +++ b/pkg/dev_compiler/lib/src/kernel/command.dart
                  @@ -139,6 +139,8 @@

                  }

                  var options = SharedCompilerOptions.fromArguments(argResults);
                  + addGeneratedVariables(declaredVariables,
                  + enableAsserts: options.enableAsserts);

                     Uri toCustomUri(Uri uri) {
                  if (!uri.hasScheme) {
                  @@ -833,6 +835,13 @@

                  return declaredVariables;
                  }

                  +/// Adds all synthesized environment variables to [variables].
                  +Map<String, String> addGeneratedVariables(Map<String, String> variables,
                  + {required bool enableAsserts}) {
                  + variables['dart.web.assertions_enabled'] = '$enableAsserts';
                  + return variables;
                  +}
                  +
                   /// The default path of the kernel summary for the Dart SDK.
                  final defaultSdkSummaryPath =
                  p.join(getSdkPath(), 'lib', '_internal', 'ddc_outline.dill');
                  diff --git a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
                  index 3f442a5..72ef463 100644
                  --- a/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
                  +++ b/pkg/dev_compiler/lib/src/kernel/expression_compiler_worker.dart
                  @@ -97,6 +97,11 @@
                  this.onDone,
                  );

                  + // Disable asserts due to failures to load source and locations on kernel
                  + // loaded from dill files in DDC.
                  + // https://github.com/dart-lang/sdk/issues/43986
                  + static const bool _enableAsserts = false;
                  +
                  /// Create expression compiler worker from [args] and start it.
                  ///
                  /// If [sendPort] is provided, creates a `receivePort` and sends it to
                  @@ -231,9 +236,9 @@
                  soundNullSafety: soundNullSafety))

                  ..fileSystem = fileSystem
                  ..omitPlatform = true
                  - ..environmentDefines = {
                  + ..environmentDefines = addGeneratedVariables({
                  if (environmentDefines != null) ...environmentDefines,
                  - }
                  +      }, enableAsserts: _enableAsserts)

                  ..explicitExperimentalFlags = explicitExperimentalFlags
                  ..onDiagnostic = _onDiagnosticHandler(errors, warnings, infos)
                  ..nnbdMode = soundNullSafety ? NnbdMode.Strong : NnbdMode.Weak
                  @@ -435,10 +440,7 @@
                  summarizeApi: false,
                  moduleName: moduleName,
                  soundNullSafety: _compilerOptions.nnbdMode == NnbdMode.Strong,
                  - // Disable asserts due to failures to load source and
                  - // locations on kernel loaded from dill files in DDC.
                  - // https://github.com/dart-lang/sdk/issues/43986
                  - enableAsserts: false),
                  + enableAsserts: _enableAsserts),
                  _moduleCache.componentForLibrary,
                  _moduleCache.moduleNameForComponent,
                  coreTypes: coreTypes,
                  diff --git a/pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart b/pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart
                  new file mode 100644
                  index 0000000..931b7e9
                  --- /dev/null
                  +++ b/pkg/dev_compiler/test/expression_compiler/assertions_enabled_test.dart
                  @@ -0,0 +1,45 @@
                  +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
                  +// for details. All rights reserved. Use of this source code is governed by a
                  +// BSD-style license that can be found in the LICENSE file.
                  +
                  +import 'package:test/test.dart';
                  +
                  +import 'expression_compiler_e2e_suite.dart';
                  +
                  +void main() async {
                  + var driver = await TestDriver.init();
                  +
                  + group('dart.web.assertions_enabled', () {
                  + const source = r'''
                  + void main() {
                  + var b = const bool.fromEnvironment('dart.web.assertions_enabled');
                  +
                  + // Breakpoint: bp
                  + print('hello world');
                  + }
                  + ''';
                  +
                  + tearDown(() async {
                  + await driver.cleanupTest();
                  + });
                  +
                  + tearDownAll(() async {
                  + await driver.finish();
                  + });
                  +
                  + test('is automatically set', () async {
                  + var setup = SetupCompilerOptions(enableAsserts: true);
                  + await driver.initSource(setup, source);
                  + // TODO(43986): Update when assertions are enabled.
                  + await driver.check(
                  + breakpointId: 'bp', expression: 'b', expectedResult: 'false');
                  + });
                  +
                  + test('is automatically unset', () async {
                  + var setup = SetupCompilerOptions(enableAsserts: false);
                  + await driver.initSource(setup, source);
                  + await driver.check(
                  + breakpointId: 'bp', expression: 'b', expectedResult: 'false');
                  + });
                  + });
                  +}
                  diff --git a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
                  index 4d7ab62..811796a 100644
                  --- a/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
                  +++ b/pkg/dev_compiler/test/expression_compiler/expression_compiler_e2e_suite.dart
                  @@ -73,7 +73,8 @@
                  final fe.CompilerOptions options;
                  final bool soundNullSafety;

                  - static fe.CompilerOptions _getOptions(bool soundNullSafety) {
                  + static fe.CompilerOptions _getOptions(
                  + {required bool enableAsserts, required bool soundNullSafety}) {
                  var options = fe.CompilerOptions()
                  ..verbose = false // set to true for debugging
                  ..sdkRoot = sdkRoot
                  @@ -83,16 +84,22 @@

                  ..omitPlatform = true
                  ..sdkSummary =
                  p.toUri(soundNullSafety ? sdkSoundSummaryPath : sdkUnsoundSummaryPath)
                  - ..environmentDefines = const {}
                  + ..environmentDefines = addGeneratedVariables({},
                  + // Disable asserts due to failures to load source and
                  + // locations on kernel loaded from dill files in DDC.
                  + // https://github.com/dart-lang/sdk/issues/43986
                  + enableAsserts: false)
                  ..nnbdMode = soundNullSafety ? fe.NnbdMode.Strong : fe.NnbdMode.Weak;
                  return options;
                  }

                     SetupCompilerOptions(
                  - {this.soundNullSafety = true,
                  + {bool enableAsserts = true,
                  + this.soundNullSafety = true,
                  this.legacyCode = false,
                  this.moduleFormat = ModuleFormat.amd})
                  - : options = _getOptions(soundNullSafety) {
                  + : options = _getOptions(
                  + soundNullSafety: soundNullSafety, enableAsserts: enableAsserts) {
                  options.onDiagnostic = (fe.DiagnosticMessage m) {
                  diagnosticMessages.addAll(m.plainTextFormatted);
                  if (m.severity == fe.Severity.error) {
                  diff --git a/pkg/dev_compiler/test/nullable_inference_test.dart b/pkg/dev_compiler/test/nullable_inference_test.dart
                  index 51ed8c2..4cabdac 100644

                  --- a/pkg/dev_compiler/test/nullable_inference_test.dart
                  +++ b/pkg/dev_compiler/test/nullable_inference_test.dart
                  @@ -6,7 +6,8 @@
                  import 'dart:convert' show jsonEncode;
                  import 'dart:io';

                  -import 'package:dev_compiler/src/kernel/command.dart' show getSdkPath;
                  +import 'package:dev_compiler/src/kernel/command.dart'
                  + show addGeneratedVariables, getSdkPath;
                  import 'package:dev_compiler/src/kernel/js_typerep.dart';
                  import 'package:dev_compiler/src/kernel/nullable_inference.dart';
                  import 'package:dev_compiler/src/kernel/target.dart';
                  @@ -705,7 +706,7 @@
                  DevCompilerTarget(TargetFlags(soundNullSafety: false)),

                  fileSystem: _fileSystem,
                  explicitExperimentalFlags: const {},
                  - environmentDefines: const {},
                  + environmentDefines: addGeneratedVariables({}, enableAsserts: true),
                  nnbdMode: fe.NnbdMode.Weak);
                  if (!identical(oldCompilerState, _compilerState)) inference = null;
                  var result =
                  diff --git a/pkg/dev_compiler/test/shared_test_options.dart b/pkg/dev_compiler/test/shared_test_options.dart
                  index c7525ca..0ed32d8 100644

                  --- a/pkg/dev_compiler/test/shared_test_options.dart
                  +++ b/pkg/dev_compiler/test/shared_test_options.dart
                  @@ -4,7 +4,8 @@

                  import 'package:dev_compiler/src/compiler/module_builder.dart'
                  show ModuleFormat;
                  -import 'package:dev_compiler/src/kernel/command.dart' show getSdkPath;
                  +import 'package:dev_compiler/src/kernel/command.dart'
                  + show addGeneratedVariables, getSdkPath;
                  import 'package:dev_compiler/src/kernel/target.dart' show DevCompilerTarget;
                  import 'package:front_end/src/api_unstable/ddc.dart';
                  import 'package:front_end/src/compute_platform_binaries_location.dart';
                  @@ -60,7 +61,7 @@

                  ..omitPlatform = true
                  ..sdkSummary =
                             soundNullSafety ? sdkSoundSummaryPath : sdkUnsoundSummaryPath

                  - ..environmentDefines = const {}
                  + ..environmentDefines = addGeneratedVariables({}, enableAsserts: true)
                  ..nnbdMode = soundNullSafety ? NnbdMode.Strong : NnbdMode.Weak;
                  return options;
                  }
                  diff --git a/tests/web/assertions_disabled_test.dart b/tests/web/assertions_disabled_test.dart
                  index fee23f4..7cbb533 100644
                  --- a/tests/web/assertions_disabled_test.dart
                  +++ b/tests/web/assertions_disabled_test.dart
                  @@ -2,6 +2,8 @@
                  // for details. All rights reserved. Use of this source code is governed by a
                  // BSD-style license that can be found in the LICENSE file.

                  +// dartdevcOptions=--no-enable-asserts
                  +
                  import "package:expect/expect.dart";

                  void main() {
                  diff --git a/tests/web_2/assertions_disabled_test.dart b/tests/web_2/assertions_disabled_test.dart
                  index fee23f4..7cbb533 100644
                  --- a/tests/web_2/assertions_disabled_test.dart
                  +++ b/tests/web_2/assertions_disabled_test.dart
                  @@ -2,6 +2,8 @@
                  // for details. All rights reserved. Use of this source code is governed by a
                  // BSD-style license that can be found in the LICENSE file.

                  +// dartdevcOptions=--no-enable-asserts
                  +
                  import "package:expect/expect.dart";

                  void main() {

                  To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
                  Gerrit-Change-Number: 273284
                  Gerrit-PatchSet: 19
                  Gerrit-Owner: Mayank Patke <fishyt...@google.com>
                  Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
                  Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
                  Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
                  Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                  Gerrit-MessageType: merged

                  CBuild (Gerrit)

                  unread,
                  Feb 13, 2023, 9:02:48 PM2/13/23
                  to Mayank Patke, Commit Queue, dart2js-te...@google.com, dart-dc-te...@google.com, rev...@dartlang.org, Anna Gringauze, Nicholas Shahan, Sigmund Cherem

                  go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)

                  Details: https://goto.google.com/dart-cbuild/find/aa0a7e7083341f5d8253fc89d45b5a19dba72900

                  View Change

                    To view, visit change 273284. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: sdk
                    Gerrit-Branch: main
                    Gerrit-Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
                    Gerrit-Change-Number: 273284
                    Gerrit-PatchSet: 19
                    Gerrit-Owner: Mayank Patke <fishyt...@google.com>
                    Gerrit-Reviewer: Anna Gringauze <anna...@google.com>
                    Gerrit-Reviewer: Mayank Patke <fishyt...@google.com>
                    Gerrit-Reviewer: Nicholas Shahan <nsh...@google.com>
                    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                    Gerrit-Comment-Date: Tue, 14 Feb 2023 02:02:45 +0000
                    Reply all
                    Reply to author
                    Forward
                    0 new messages