Unverified Commit 6fe800ab authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[null-safety] remove enable experiment flags (#69930)

parent 4c1d015e
...@@ -383,7 +383,7 @@ Future<void> _runExampleProjectBuildTests(FileSystemEntity exampleDirectory) asy ...@@ -383,7 +383,7 @@ Future<void> _runExampleProjectBuildTests(FileSystemEntity exampleDirectory) asy
final String examplePath = exampleDirectory.path; final String examplePath = exampleDirectory.path;
final bool hasNullSafety = File(path.join(examplePath, 'null_safety')).existsSync(); final bool hasNullSafety = File(path.join(examplePath, 'null_safety')).existsSync();
final List<String> additionalArgs = hasNullSafety final List<String> additionalArgs = hasNullSafety
? <String>['--enable-experiment', 'non-nullable', '--no-sound-null-safety'] ? <String>['--no-sound-null-safety']
: <String>[]; : <String>[];
if (Directory(path.join(examplePath, 'android')).existsSync()) { if (Directory(path.join(examplePath, 'android')).existsSync()) {
await _flutterBuildApk(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching); await _flutterBuildApk(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
...@@ -589,8 +589,8 @@ Future<void> _runAddToAppLifeCycleTests() async { ...@@ -589,8 +589,8 @@ Future<void> _runAddToAppLifeCycleTests() async {
Future<void> _runFrameworkTests() async { Future<void> _runFrameworkTests() async {
final bq.BigqueryApi bigqueryApi = await _getBigqueryApi(); final bq.BigqueryApi bigqueryApi = await _getBigqueryApi();
final List<String> soundNullSafetyOptions = <String>['--enable-experiment=non-nullable', '--null-assertions', '--sound-null-safety']; final List<String> soundNullSafetyOptions = <String>['--null-assertions', '--sound-null-safety'];
final List<String> mixedModeNullSafetyOptions = <String>['--enable-experiment=non-nullable', '--null-assertions', '--no-sound-null-safety']; final List<String> mixedModeNullSafetyOptions = <String>['--null-assertions', '--no-sound-null-safety'];
final List<String> trackWidgetCreationAlternatives = <String>['--track-widget-creation', '--no-track-widget-creation']; final List<String> trackWidgetCreationAlternatives = <String>['--track-widget-creation', '--no-track-widget-creation'];
Future<void> runWidgets() async { Future<void> runWidgets() async {
...@@ -634,7 +634,6 @@ Future<void> _runFrameworkTests() async { ...@@ -634,7 +634,6 @@ Future<void> _runFrameworkTests() async {
Future<void> runPrivateTests() async { Future<void> runPrivateTests() async {
final List<String> args = <String>[ final List<String> args = <String>[
'run', 'run',
'--enable-experiment=non-nullable',
'--sound-null-safety', '--sound-null-safety',
'test_private.dart', 'test_private.dart',
]; ];
...@@ -938,13 +937,9 @@ Future<void> _runWebIntegrationTests() async { ...@@ -938,13 +937,9 @@ Future<void> _runWebIntegrationTests() async {
] ]
); );
await _runWebDebugTest('lib/sound_mode.dart', additionalArguments: <String>[ await _runWebDebugTest('lib/sound_mode.dart', additionalArguments: <String>[
'--enable-experiment',
'non-nullable',
'--sound-null-safety', '--sound-null-safety',
]); ]);
await _runWebReleaseTest('lib/sound_mode.dart', additionalArguments: <String>[ await _runWebReleaseTest('lib/sound_mode.dart', additionalArguments: <String>[
'--enable-experiment',
'non-nullable',
'--sound-null-safety', '--sound-null-safety',
]); ]);
} }
...@@ -1049,8 +1044,6 @@ Future<void> _runWebDebugTest(String target, { ...@@ -1049,8 +1044,6 @@ Future<void> _runWebDebugTest(String target, {
'--debug', '--debug',
if (enableNullSafety) if (enableNullSafety)
...<String>[ ...<String>[
'--enable-experiment',
'non-nullable',
'--no-sound-null-safety', '--no-sound-null-safety',
'--null-assertions', '--null-assertions',
], ],
......
# Exclude lib/main.dart to avoid warnings about the non_nullable
# experiment before it is enabled.
analyzer:
exclude:
- lib/main.dart
- test/test_test.dart
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// @dart=2.10
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
String? unused; String? unused;
......
...@@ -5,7 +5,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev ...@@ -5,7 +5,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.12.0-0 <3.0.0"
dependencies: dependencies:
flutter: flutter:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// @dart=2.8 // @dart = 2.8
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
void main() { void main() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// @dart=2.8 // @dart = 2.8
import 'null_enabled_api.dart'; import 'null_enabled_api.dart';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// @dart=2.10 // @dart = 2.12
void methodThatAcceptsNonNull(int x) { void methodThatAcceptsNonNull(int x) {
print(x + 2); print(x + 2);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// @dart=2.10 // @dart = 2.12
String? x; String? x;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// @dart=2.10 // @dart = 2.12
import 'dart:html' as html; import 'dart:html' as html;
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
include: ../../analysis_options.yaml include: ../../analysis_options.yaml
analyzer: analyzer:
enable-experiment:
- non-nullable
errors: errors:
always_require_non_null_named_parameters: false # not needed with nnbd always_require_non_null_named_parameters: false # not needed with nnbd
type_init_formals: false # https://github.com/dart-lang/linter/issues/2192 type_init_formals: false # https://github.com/dart-lang/linter/issues/2192
......
...@@ -2,7 +2,7 @@ name: flutter_examples_layers ...@@ -2,7 +2,7 @@ name: flutter_examples_layers
environment: environment:
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
sdk: ">=2.10.0-0.0.dev <3.0.0" sdk: ">=2.12.0-0 <3.0.0"
dependencies: dependencies:
flutter: flutter:
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
include: ../analysis_options.yaml include: ../analysis_options.yaml
analyzer: analyzer:
enable-experiment:
- non-nullable
errors: errors:
always_require_non_null_named_parameters: false # not needed with nnbd always_require_non_null_named_parameters: false # not needed with nnbd
type_init_formals: false # https://github.com/dart-lang/linter/issues/2192 type_init_formals: false # https://github.com/dart-lang/linter/issues/2192
......
...@@ -4,7 +4,7 @@ description: Tests private interfaces of the flutter ...@@ -4,7 +4,7 @@ description: Tests private interfaces of the flutter
environment: environment:
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
sdk: ">=2.10.0-0.0.dev <3.0.0" sdk: ">=2.12.0-0 <3.0.0"
dependencies: dependencies:
# To update these, use "flutter update-packages --force-upgrade". # To update these, use "flutter update-packages --force-upgrade".
...@@ -18,6 +18,5 @@ dependencies: ...@@ -18,6 +18,5 @@ dependencies:
file: 6.0.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
platform: 3.0.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.0.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies:
# PUBSPEC CHECKSUM: b421 # PUBSPEC CHECKSUM: b421
...@@ -3,7 +3,7 @@ author: Flutter Authors <flutter-dev@googlegroups.com> ...@@ -3,7 +3,7 @@ author: Flutter Authors <flutter-dev@googlegroups.com>
environment: environment:
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
sdk: ">=2.10.0-0.0.dev <3.0.0" sdk: ">=2.12.0-0 <3.0.0"
dependencies: dependencies:
# To update these, use "flutter update-packages --force-upgrade". # To update these, use "flutter update-packages --force-upgrade".
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
include: ../analysis_options.yaml include: ../analysis_options.yaml
analyzer: analyzer:
enable-experiment:
- non-nullable
errors: errors:
always_require_non_null_named_parameters: false # not needed with nnbd always_require_non_null_named_parameters: false # not needed with nnbd
type_init_formals: false # https://github.com/dart-lang/linter/issues/2192 type_init_formals: false # https://github.com/dart-lang/linter/issues/2192
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
include: ../analysis_options.yaml include: ../analysis_options.yaml
analyzer: analyzer:
enable-experiment:
- non-nullable
errors: errors:
always_require_non_null_named_parameters: false # not needed with nnbd always_require_non_null_named_parameters: false # not needed with nnbd
unrelated_type_equality_checks: false # https://github.com/dart-lang/linter/issues/2196 unrelated_type_equality_checks: false # https://github.com/dart-lang/linter/issues/2196
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment