Retire and remove 3.9 experiment flags.
Change-Id: I72262910b590f93ca5de7b3286c226d5ecaf3276 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443803 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Lasse Nielsen <lrn@google.com>
This commit is contained in:
committed by
Commit Queue
parent
82694c765a
commit
83b2c5d3c3
@@ -109,7 +109,7 @@ enum ExperimentalFlag {
|
||||
getterSetterError(
|
||||
name: 'getter-setter-error',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
experimentEnabledVersion: const Version(3, 9),
|
||||
experimentReleasedVersion: const Version(3, 9),
|
||||
),
|
||||
@@ -181,7 +181,7 @@ enum ExperimentalFlag {
|
||||
nativeAssets(
|
||||
name: 'native-assets',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
experimentEnabledVersion: const Version(3, 9),
|
||||
experimentReleasedVersion: const Version(3, 9),
|
||||
),
|
||||
@@ -205,7 +205,7 @@ enum ExperimentalFlag {
|
||||
nullAwareElements(
|
||||
name: 'null-aware-elements',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
experimentEnabledVersion: const Version(3, 8),
|
||||
experimentReleasedVersion: const Version(3, 8),
|
||||
),
|
||||
@@ -253,7 +253,7 @@ enum ExperimentalFlag {
|
||||
soundFlowAnalysis(
|
||||
name: 'sound-flow-analysis',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
experimentEnabledVersion: const Version(3, 9),
|
||||
experimentReleasedVersion: const Version(3, 9),
|
||||
),
|
||||
|
||||
@@ -785,7 +785,7 @@ class IsExpired {
|
||||
static const bool generic_metadata = true;
|
||||
|
||||
/// Expiration status of the experiment "getter-setter-error"
|
||||
static const bool getter_setter_error = false;
|
||||
static const bool getter_setter_error = true;
|
||||
|
||||
/// Expiration status of the experiment "inference-update-1"
|
||||
static const bool inference_update_1 = true;
|
||||
@@ -812,7 +812,7 @@ class IsExpired {
|
||||
static const bool named_arguments_anywhere = true;
|
||||
|
||||
/// Expiration status of the experiment "native-assets"
|
||||
static const bool native_assets = false;
|
||||
static const bool native_assets = true;
|
||||
|
||||
/// Expiration status of the experiment "non-nullable"
|
||||
static const bool non_nullable = true;
|
||||
@@ -821,7 +821,7 @@ class IsExpired {
|
||||
static const bool nonfunction_type_aliases = true;
|
||||
|
||||
/// Expiration status of the experiment "null-aware-elements"
|
||||
static const bool null_aware_elements = false;
|
||||
static const bool null_aware_elements = true;
|
||||
|
||||
/// Expiration status of the experiment "patterns"
|
||||
static const bool patterns = true;
|
||||
@@ -839,7 +839,7 @@ class IsExpired {
|
||||
static const bool set_literals = true;
|
||||
|
||||
/// Expiration status of the experiment "sound-flow-analysis"
|
||||
static const bool sound_flow_analysis = false;
|
||||
static const bool sound_flow_analysis = true;
|
||||
|
||||
/// Expiration status of the experiment "spread-collections"
|
||||
static const bool spread_collections = true;
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'package:dartdev/src/experiments.dart';
|
||||
import 'package:dartdev/src/sdk.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// ONLY use dedicated test experiments in this test.
|
||||
// Any other experiment will eventually be retired, and then a test depending
|
||||
// on it will fail.
|
||||
|
||||
void main() {
|
||||
group('experiments', () {
|
||||
test('experimentalFeatures', () {
|
||||
@@ -20,24 +23,5 @@ void main() {
|
||||
final errors = validateExperiments(['foo']);
|
||||
expect(errors, equals(['Unknown experiment: foo']));
|
||||
});
|
||||
|
||||
test('native assets experiment', () {
|
||||
final errors = validateExperiments(['native-assets']);
|
||||
final channel = Runtime.runtime.channel!;
|
||||
switch (channel) {
|
||||
case 'stable':
|
||||
case 'beta':
|
||||
expect(
|
||||
errors,
|
||||
equals([
|
||||
'Unavailable experiment: native-assets (this experiment is only '
|
||||
'available on the main, dev channels, this current channel is $channel)',
|
||||
]),
|
||||
);
|
||||
|
||||
default:
|
||||
expect(errors, isEmpty);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ class ExperimentalFlag {
|
||||
static const ExperimentalFlag getterSetterError = const ExperimentalFlag(
|
||||
name: 'getter-setter-error',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
enabledVersion: const Version(3, 9),
|
||||
experimentEnabledVersion: const Version(3, 9),
|
||||
experimentReleasedVersion: const Version(3, 9),
|
||||
@@ -254,7 +254,7 @@ class ExperimentalFlag {
|
||||
static const ExperimentalFlag nativeAssets = const ExperimentalFlag(
|
||||
name: 'native-assets',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
enabledVersion: const Version(3, 9),
|
||||
experimentEnabledVersion: const Version(3, 9),
|
||||
experimentReleasedVersion: const Version(3, 9),
|
||||
@@ -281,7 +281,7 @@ class ExperimentalFlag {
|
||||
static const ExperimentalFlag nullAwareElements = const ExperimentalFlag(
|
||||
name: 'null-aware-elements',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
enabledVersion: const Version(3, 8),
|
||||
experimentEnabledVersion: const Version(3, 8),
|
||||
experimentReleasedVersion: const Version(3, 8),
|
||||
@@ -335,7 +335,7 @@ class ExperimentalFlag {
|
||||
static const ExperimentalFlag soundFlowAnalysis = const ExperimentalFlag(
|
||||
name: 'sound-flow-analysis',
|
||||
isEnabledByDefault: true,
|
||||
isExpired: false,
|
||||
isExpired: true,
|
||||
enabledVersion: const Version(3, 9),
|
||||
experimentEnabledVersion: const Version(3, 9),
|
||||
experimentReleasedVersion: const Version(3, 9),
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
--enable-experiment=getter-setter-error
|
||||
|
||||
@@ -63,8 +63,3 @@ regress/issue_34850: UnknownChunk # Test has parser errors
|
||||
coverage/external_test: FormatterCrash
|
||||
coverage/operator_unsupported_test: EmptyOutput
|
||||
coverage/syntax_get_set_syntax_test: UnknownChunk
|
||||
|
||||
null_aware_elements/constant_collections: FormatterCrash
|
||||
null_aware_elements/constant_null_aware_map_entry_shorting: FormatterCrash
|
||||
null_aware_elements/constant_null_aware_map_entry_shorting_erroneous: FormatterCrash
|
||||
null_aware_elements/simple_positive: FormatterCrash
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
const nullConst = null;
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
const nullConst = null;
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
String log = "";
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
test1(String a, num x) {
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
test(String? key, num? value) {
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
String? stringQuestion() => null;
|
||||
|
||||
main() {
|
||||
void main() {
|
||||
<String>[?""]; // Ok.
|
||||
// ^
|
||||
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
// This is a helper function to suggest to the type inference that the argument
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// 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.
|
||||
|
||||
// SharedOptions=--enable-experiment=null-aware-elements
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
List<int> testList(int x) {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of equality comparisons (binary expressions using
|
||||
// `==` or `!=`) when `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
// `<nonNullable> == <Null>` is known to evaluate to `false`.
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of assignments that fully demote the assigned
|
||||
// variable when `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
// If an assignment fully demotes a variable, types of interest are not cleared.
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of if-null expressions (expressions involving `??`)
|
||||
// when `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
// ignore_for_file: dead_null_aware_expression
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of null aware accesses (expressions involving `?.`)
|
||||
// when `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
// ignore_for_file: invalid_null_aware_operator
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
// this test reflects the current behavior of the `sound-flow-analysis` feature,
|
||||
// as discussed in https://github.com/dart-lang/language/issues/4344.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
// ignore_for_file: invalid_null_aware_operator
|
||||
|
||||
import 'package:expect/static_type_helper.dart';
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of null-aware map entries when `sound-flow-analysis`
|
||||
// is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
// ignore_for_file: invalid_null_aware_operator
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of patterns that match a non-nullable scrutinee when
|
||||
// `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
// ignore_for_file: unnecessary_null_check_pattern
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of patterns that match a Null scrutinee when
|
||||
// `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
typedef IntQuestion = int?;
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of patterns that fail to match a non-nullable
|
||||
// scrutinee when `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of patterns that fail to match a Null scrutinee when
|
||||
// `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
// `<nonNullable> <var>` is known to mismatch a null expression.
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Checks that when `sound-flow-analysis` is enabled, each type in a promotion
|
||||
// chain is a proper subtype of the previous type (and of the declared type).
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
class C {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of a trivially satisfied type check (an `is` test
|
||||
// that is guaranteed to succeed) when `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
// If `x` is of type `T`, flow analysis considers `x is T` to be guaranteed to
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Tests how flow analysis layers promotions from `try` and `finally` blocks
|
||||
// when `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
class C {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// Exercises flow analysis of type tests (`is` and `as` expressions) when
|
||||
// `sound-flow-analysis` is enabled.
|
||||
|
||||
// SharedOptions=--enable-experiment=sound-flow-analysis
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
import '../static_type_helper.dart';
|
||||
|
||||
@@ -135,11 +135,6 @@ features:
|
||||
experimentalReleaseVersion: '3.3.0'
|
||||
help: "Static meta-programming"
|
||||
|
||||
native-assets:
|
||||
help: "Compile and bundle native assets."
|
||||
channels: [ "main", "dev", "beta" ]
|
||||
enabledIn: '3.9.0'
|
||||
|
||||
record-use:
|
||||
help: "Output arguments used by static functions."
|
||||
channels: [ "main", "dev" ]
|
||||
@@ -183,6 +178,11 @@ features:
|
||||
}
|
||||
help: "Shorter dot syntax for static accesses."
|
||||
|
||||
native-assets:
|
||||
help: "Compile and bundle native assets."
|
||||
channels: [ "main", "dev", "beta" ]
|
||||
enabledIn: '3.9.0'
|
||||
expired: true
|
||||
|
||||
getter-setter-error:
|
||||
enabledIn: '3.9.0'
|
||||
@@ -197,6 +197,7 @@ features:
|
||||
print(a.foo);
|
||||
}
|
||||
help: "Stop reporting errors about mismatching types in a getter/setter pair."
|
||||
expired: true
|
||||
|
||||
sound-flow-analysis:
|
||||
enabledIn: '3.9.0'
|
||||
@@ -209,6 +210,7 @@ features:
|
||||
}
|
||||
# See https://github.com/dart-lang/language/issues/3100
|
||||
help: "Assume sound null safety when computing type promotion, reachability, and definite assignment."
|
||||
expired: true
|
||||
|
||||
null-aware-elements:
|
||||
enabledIn: '3.8.0'
|
||||
@@ -220,6 +222,7 @@ features:
|
||||
}
|
||||
}
|
||||
help: "Null-aware elements and map entries in collections."
|
||||
expired: true
|
||||
|
||||
inference-using-bounds:
|
||||
enabledIn: '3.7.0'
|
||||
|
||||
Reference in New Issue
Block a user