Skip to content

Commit 65e8f10

Browse files
committed
Cleanup unused null-safety options
1 parent 4fc5d8c commit 65e8f10

File tree

7 files changed

+4
-39
lines changed

7 files changed

+4
-39
lines changed

dwds/lib/src/services/expression_compiler_service.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class _Compiler {
7878
'--module-format',
7979
compilerOptions.moduleFormat.name,
8080
if (verbose) '--verbose',
81-
'--sound-null-safety',
8281
for (final experiment in compilerOptions.experiments)
8382
'--enable-experiment=$experiment',
8483
if (compilerOptions.canaryFeatures) '--canary',

frontend_server_client/example/web_client.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ void main(List<String> args) async {
2727
'--multi-root-scheme=org-dartlang-sdk',
2828
'--modules=amd',
2929
'--module-name=dart_sdk',
30-
'--sound-null-safety',
3130
'-o',
3231
dartSdkJs,
3332
p.url.join(sdkDir, sdkKernelPath),

frontend_server_common/lib/src/frontend_server_client.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ class ResidentCompiler {
394394
],
395395
if (useDebuggerModuleNames) '--debugger-module-names',
396396
'--experimental-emit-debug-metadata',
397-
'--sound-null-safety',
398397
for (final experiment in compilerOptions.experiments)
399398
'--enable-experiment=$experiment',
400399
if (compilerOptions.canaryFeatures) '--dartdevc-canary',

webdev/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## 3.8.0-wip
2+
- Remove deprecated `--null-safety` flag. All Dart 3 compiles use sound null
3+
safety.
24

35
## 3.7.2
46

webdev/lib/src/command/configuration.dart

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ const releaseFlag = 'release';
3030
const requireBuildWebCompilersFlag = 'build-web-compilers';
3131
const enableExpressionEvaluationFlag = 'enable-expression-evaluation';
3232
const verboseFlag = 'verbose';
33-
const nullSafetyFlag = 'null-safety';
34-
const nullSafetySound = 'sound';
35-
const nullSafetyUnsound = 'unsound';
36-
const nullSafetyAuto = 'auto';
3733
const disableDdsFlag = 'disable-dds';
3834
const enableExperimentOption = 'enable-experiment';
3935
const canaryFeaturesFlag = 'canary';
@@ -105,7 +101,6 @@ class Configuration {
105101
final bool? _enableExpressionEvaluation;
106102
final bool? _verbose;
107103
final bool? _disableDds;
108-
final String? _nullSafety;
109104
final List<String>? _experiments;
110105
final bool? _canaryFeatures;
111106
final bool? _offline;
@@ -132,7 +127,6 @@ class Configuration {
132127
bool? enableExpressionEvaluation,
133128
bool? verbose,
134129
bool? disableDds,
135-
String? nullSafety,
136130
List<String>? experiments,
137131
bool? canaryFeatures,
138132
bool? offline,
@@ -155,7 +149,6 @@ class Configuration {
155149
_disableDds = disableDds,
156150
_enableExpressionEvaluation = enableExpressionEvaluation,
157151
_verbose = verbose,
158-
_nullSafety = nullSafety,
159152
_experiments = experiments,
160153
_canaryFeatures = canaryFeatures,
161154
_offline = offline {
@@ -231,7 +224,6 @@ class Configuration {
231224
enableExpressionEvaluation:
232225
other._enableExpressionEvaluation ?? _enableExpressionEvaluation,
233226
verbose: other._verbose ?? _verbose,
234-
nullSafety: other._nullSafety ?? _nullSafety,
235227
experiments: other._experiments ?? _experiments,
236228
canaryFeatures: other._canaryFeatures ?? _canaryFeatures,
237229
offline: other._offline ?? _offline);
@@ -278,13 +270,6 @@ class Configuration {
278270

279271
bool get verbose => _verbose ?? false;
280272

281-
/// Null safety mode:
282-
///
283-
/// 'sound', 'unsound', or 'auto'.
284-
/// 'auto' indicates that the default `package:build_web_compilers`
285-
/// behavior should be used.
286-
String get nullSafety => _nullSafety ?? 'auto';
287-
288273
List<String> get experiments => _experiments ?? [];
289274

290275
bool get canaryFeatures => _canaryFeatures ?? false;
@@ -398,10 +383,6 @@ class Configuration {
398383
? argResults[verboseFlag] as bool?
399384
: defaultConfiguration.verbose;
400385

401-
final nullSafety = argResults.options.contains(nullSafetyFlag)
402-
? argResults[nullSafetyFlag] as String?
403-
: defaultConfiguration.nullSafety;
404-
405386
final disableDds = argResults.options.contains(disableDdsFlag)
406387
? argResults[disableDdsFlag] as bool?
407388
: defaultConfiguration.disableDds;
@@ -441,7 +422,6 @@ class Configuration {
441422
disableDds: disableDds,
442423
enableExpressionEvaluation: enableExpressionEvaluation,
443424
verbose: verbose,
444-
nullSafety: nullSafety,
445425
experiments: experiments,
446426
canaryFeatures: canaryFeatures,
447427
offline: offline,

webdev/lib/src/command/shared.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,8 @@ void addSharedArgs(ArgParser argParser,
3030
)
3131
..addOption(nullSafetyFlag,
3232
abbr: 'n',
33-
defaultsTo: nullSafetyAuto,
34-
allowed: [nullSafetySound, nullSafetyUnsound, nullSafetyAuto],
35-
help:
36-
'DEPRECATED: If "sound", `package:build_web_compilers` will be run '
37-
'with sound null safety support. '
38-
'If "unsound", `package:build_web_compilers` will be run without '
39-
'sound null safety support. '
40-
'If "auto", the default `package:build_web_compilers` '
41-
'behavior is used.',
33+
help: 'DEPRECATED: This flag is ignored and will be removed in an'
34+
'upcoming release.',
4235
hide: true)
4336
..addFlag(releaseFlag,
4437
abbr: 'r',

webdev/test/configuration_test.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ void main() {
1212
argParser = ArgParser()
1313
..addFlag('release')
1414
..addFlag(launchInChromeFlag, defaultsTo: false)
15-
..addOption(nullSafetyFlag, defaultsTo: nullSafetyAuto)
1615
..addOption(userDataDirFlag, defaultsTo: null);
1716
});
1817

@@ -71,12 +70,6 @@ void main() {
7170
throwsA(isA<InvalidConfiguration>()));
7271
});
7372

74-
test('nullSafety defaults to auto', () {
75-
final argResults = argParser.parse(['']);
76-
final defaultConfiguration = Configuration.fromArgs(argResults);
77-
expect(defaultConfiguration.nullSafety, equals(nullSafetyAuto));
78-
});
79-
8073
test(
8174
'must not provide debug related configuration when enableInjectedClient '
8275
'is false', () {

0 commit comments

Comments
 (0)