Retire experiment flags introduced in 2.18.

Change-Id: I660bbf09c758f88589a10b0334ddd34c0620460d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275244
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
This commit is contained in:
Lasse R.H. Nielsen 2022-12-15 13:18:50 +00:00 committed by Commit Queue
parent dde72f78a2
commit 2274ce9b05
14 changed files with 7 additions and 117 deletions

View file

@ -68,7 +68,7 @@ enum ExperimentalFlag {
inferenceUpdate1(
name: 'inference-update-1',
isEnabledByDefault: true,
isExpired: false,
isExpired: true,
experimentEnabledVersion: const Version(2, 18),
experimentReleasedVersion: const Version(2, 18)),

View file

@ -507,7 +507,7 @@ class IsExpired {
static const bool generic_metadata = true;
/// Expiration status of the experiment "inference-update-1"
static const bool inference_update_1 = false;
static const bool inference_update_1 = true;
/// Expiration status of the experiment "inference-update-2"
static const bool inference_update_2 = false;

View file

@ -54,7 +54,7 @@ class ExperimentalFlag {
const ExperimentalFlag(
name: 'alternative-invalidation-strategy',
isEnabledByDefault: true,
isExpired: false,
isExpired: true,
enabledVersion: const Version(2, 18),
experimentEnabledVersion: const Version(2, 18),
experimentReleasedVersion: const Version(2, 18));
@ -126,7 +126,7 @@ class ExperimentalFlag {
static const ExperimentalFlag inferenceUpdate1 = const ExperimentalFlag(
name: 'inference-update-1',
isEnabledByDefault: true,
isExpired: false,
isExpired: true,
enabledVersion: const Version(2, 18),
experimentEnabledVersion: const Version(2, 18),
experimentReleasedVersion: const Version(2, 18));

View file

@ -33,14 +33,11 @@ Future<void> main(List<String> args) async {
}
bool quicker = false;
bool alternativeInvalidation = false;
String? rootPath;
for (String arg in args) {
if (arg == "--quicker") {
quicker = true;
} else if (arg == "--alternativeInvalidation") {
alternativeInvalidation = true;
} else if (arg.startsWith("--path=")) {
rootPath = arg.substring("--path=".length);
} else {
@ -177,7 +174,6 @@ Future<void> main(List<String> args) async {
print("About to run with "
"quicker = $quicker; "
"alternativeInvalidation = $alternativeInvalidation; "
"path = $rootPath; "
"...");
@ -200,11 +196,6 @@ Future<void> main(List<String> args) async {
"--initialize-from-dill",
"$rootPath/cache.dill",
];
if (alternativeInvalidation) {
processArgs.add("--enable-experiment=alternative-invalidation-strategy");
} else {
processArgs.add("--enable-experiment=no-alternative-invalidation-strategy");
}
await heapHelper.start(processArgs,
stdoutReceiver: (s) {

View file

@ -40,42 +40,6 @@ Future<void> main(List<String> args) async {
startedProcesses.add(leakTest);
}
}
{
// Slow: Leak-test with alternative invalidation.
Uri leakTester =
Platform.script.resolve("flutter_gallery_leak_tester.dart");
if (!new File.fromUri(leakTester).existsSync()) {
exitCode = 1;
print("Couldn't find $leakTester");
} else {
// Note that the leak test run above will start checking out flutter
// gallery (etc) and that it has to finish before starting this.
// We therefore wait for the observatory line being printed before
// starting. Wait at most 10 minutes though.
// ignore: unawaited_futures
() async {
for (int i = 0; i < 10 * 60; i++) {
if (leakTest == null || leakTest.observatoryLines.isNotEmpty) {
break;
}
await Future.delayed(new Duration(seconds: 1));
}
// The tools/bots/flutter/compile_flutter.sh script passes `--path`
// --- we'll just pass everything along.
startedProcesses.add(await run(
[
leakTester.toString(),
...args,
"--alternativeInvalidation",
],
"leak test alternative invalidation",
));
startedDelayedProcess.complete();
}();
}
}
{
// Weak suite with fuzzing.

View file

@ -1,57 +0,0 @@
# Copyright (c) 2019, 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.md file.
# Copy of no_outline_change_1 with the advanced invalidation disabled.
type: newworld
worlds:
- entry: actualMain.dart
experiments: no-alternative-invalidation-strategy
sources:
actualMain.dart: |
import 'main.dart' as m;
main() {
m.main();
}
main.dart: |
import 'libA.dart';
main() {
whatever();
}
mainHello() {}
libA.dart: |
import 'main.dart';
import 'libB.dart';
class Foo {}
whatever() {
Bar bar = new Bar(new Foo());
mainHello();
}
libB.dart: |
import 'libA.dart';
class Bar {
Foo foo;
Bar(this.foo);
}
expectedLibraryCount: 4
advancedInvalidation: disabled
- entry: actualMain.dart
experiments: no-alternative-invalidation-strategy
worldType: updated
expectInitializeFromDill: false
invalidate:
- main.dart
sources:
main.dart: |
import 'libA.dart';
main() {
whatever();
mainHello();
}
mainHello() {}
expectedLibraryCount: 4
advancedInvalidation: disabled

View file

@ -1 +0,0 @@
--enable-experiment=inference-update-1

View file

@ -8,7 +8,6 @@
// process. We need to make sure that the dependency tracking logic properly
// accounts for this extra argument.
// SharedOptions=--enable-experiment=inference-update-1
testLaterUnnamedParameter(int i) {
i._laterUnnamedParameter(0, (x) {

View file

@ -8,8 +8,6 @@
// The way this happens is that the type parameter is "fixed" after the downward
// inference phase and is not changed in further inference phases.
// SharedOptions=--enable-experiment=inference-update-1
import '../static_type_helper.dart';
testProductOfNums(List<num> values) {

View file

@ -6,7 +6,7 @@
// "horizontally" from a non-closure argument of an invocation to a closure
// argument.
// SharedOptions=--enable-experiment=inference-update-1
// @dart=2.18
import '../static_type_helper.dart';

View file

@ -8,8 +8,6 @@
// process. We need to make sure that the dependency tracking logic properly
// accounts for this extra argument.
// SharedOptions=--enable-experiment=inference-update-1
import '../static_type_helper.dart';
testLaterUnnamedParameter(int i) {

View file

@ -4,8 +4,6 @@
// Tests horizontal inference for a variety of types of invocations.
// SharedOptions=--enable-experiment=inference-update-1
import '../static_type_helper.dart';
testFunctionExpressionInvocation() {

View file

@ -8,8 +8,6 @@
// naturally out of the fact that closures are analyzed last (so that their
// types can depend on the types of other arguments).
// SharedOptions=--enable-experiment=inference-update-1
import '../static_type_helper.dart';
withUnnamedArguments(int? i, void Function(void Function(), Object?) f) {

View file

@ -158,6 +158,7 @@ features:
help: "Alternative invalidation strategy for incremental compilation."
category: "CFE"
enabledIn: '2.18.0'
expired: true
nonfunction-type-aliases:
help: "Type aliases define a <type>, not just a <functionType>"
@ -288,6 +289,7 @@ features:
inference-update-1:
help: "Horizontal type inference for function expressions passed to generic invocations."
enabledIn: '2.18.0'
expired: true
validation: |
void test(List<int> list) {
var a = list.fold(0, (x, y) => x + y);