Skip to content

Commit

Permalink
Revert "Expire 3.0.0 experiment flags."
Browse files Browse the repository at this point in the history
This reverts commit 6f29e7f.

Reason for revert: broke g3 bot

Original change's description:
> Expire 3.0.0 experiment flags.
>
> TEST=Existing tests covers.
> Change-Id: I161eefdc28c74f63ba1ee926800a01eea03d9930
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331960
> Commit-Queue: Lasse Nielsen <[email protected]>
> Reviewed-by: Alexander Thomas <[email protected]>

Change-Id: Ied6f612dc922824ffdadc4660898f3b859922ff5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332582
Reviewed-by: Lasse Nielsen <[email protected]>
Reviewed-by: Alexander Thomas <[email protected]>
Commit-Queue: Alexander Thomas <[email protected]>
Auto-Submit: Alexander Aprelev <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
  • Loading branch information
aam authored and Commit Queue committed Oct 27, 2023
1 parent ca67a27 commit 6a464c9
Show file tree
Hide file tree
Showing 26 changed files with 459 additions and 25 deletions.
8 changes: 4 additions & 4 deletions pkg/_fe_analyzer_shared/lib/src/experiments/flags.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum ExperimentalFlag {
classModifiers(
name: 'class-modifiers',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0)),

Expand Down Expand Up @@ -125,21 +125,21 @@ enum ExperimentalFlag {
patterns(
name: 'patterns',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0)),

records(
name: 'records',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0)),

sealedClass(
name: 'sealed-class',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0)),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void main() {
@reflectiveTest
class RemoveBreakBulkTest extends BulkFixProcessorTest {
@override
List<String> get experiments => [];
List<String> get experiments => ['patterns', 'records'];

@override
String get lintCode => LintNames.unnecessary_breaks;
Expand Down Expand Up @@ -76,7 +76,7 @@ void f() {
@reflectiveTest
class RemoveBreakTest extends FixProcessorLintTest {
@override
List<String> get experiments => [];
List<String> get experiments => ['patterns', 'records'];

@override
FixKind get kind => DartFixKind.REMOVE_BREAK;
Expand Down
8 changes: 4 additions & 4 deletions pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ class IsEnabledByDefault {
/// value in [IsEnabledByDefault]).
class IsExpired {
/// Expiration status of the experiment "class-modifiers"
static const bool class_modifiers = true;
static const bool class_modifiers = false;

/// Expiration status of the experiment "const-functions"
static const bool const_functions = false;
Expand Down Expand Up @@ -531,13 +531,13 @@ class IsExpired {
static const bool nonfunction_type_aliases = true;

/// Expiration status of the experiment "patterns"
static const bool patterns = true;
static const bool patterns = false;

/// Expiration status of the experiment "records"
static const bool records = true;
static const bool records = false;

/// Expiration status of the experiment "sealed-class"
static const bool sealed_class = true;
static const bool sealed_class = false;

/// Expiration status of the experiment "set-literals"
static const bool set_literals = true;
Expand Down
2 changes: 1 addition & 1 deletion pkg/compiler/test/inference/record_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ main() {
}
""",
testBackendWorld: true,
options: [Flags.soundNullSafety]);
options: ['--enable-experiment=records', Flags.soundNullSafety]);
JClosedWorld world = env.jClosedWorld;
final domain = world.abstractValueDomain as CommonMasks;

Expand Down
2 changes: 1 addition & 1 deletion pkg/dartdev/test/commands/analyze_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ analyzer:
expect(result.exitCode, 0);
expect(result.stdout, contains('No issues found!'));
expect(result.stderr, contains("'records' is now enabled by default"));
}, skip: 'records are enabled by default in 3.0');
});

test('--verbose', () async {
p = project(mainSrc: '''
Expand Down
2 changes: 2 additions & 0 deletions pkg/dds/test/dap/integration/debug_variables_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ void main(List<String> args) {
final stop = await client.hitBreakpoint(
testFile,
breakpointLine,
// TODO(dantup): Remove toolArgs when this is no longer required.
toolArgs: ['--enable-experiment=records'],
);

// Check the fields directly on the record.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ExperimentalFlag {
static const ExperimentalFlag classModifiers = const ExperimentalFlag(
name: 'class-modifiers',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
enabledVersion: const Version(3, 0),
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0));
Expand Down Expand Up @@ -190,23 +190,23 @@ class ExperimentalFlag {
static const ExperimentalFlag patterns = const ExperimentalFlag(
name: 'patterns',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
enabledVersion: const Version(3, 0),
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0));

static const ExperimentalFlag records = const ExperimentalFlag(
name: 'records',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
enabledVersion: const Version(3, 0),
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0));

static const ExperimentalFlag sealedClass = const ExperimentalFlag(
name: 'sealed-class',
isEnabledByDefault: true,
isExpired: true,
isExpired: false,
enabledVersion: const Version(3, 0),
experimentEnabledVersion: const Version(3, 0),
experimentReleasedVersion: const Version(3, 0));
Expand Down
Loading

0 comments on commit 6a464c9

Please sign in to comment.