diff --git a/pkg/dartdev/lib/dartdev.dart b/pkg/dartdev/lib/dartdev.dart index d1466e91b536..2b57c07dc528 100644 --- a/pkg/dartdev/lib/dartdev.dart +++ b/pkg/dartdev/lib/dartdev.dart @@ -71,7 +71,7 @@ class DartdevRunner extends CommandRunner { 'A command-line utility for Dart development'; @override - late final ArgParser argParser; + final ArgParser argParser; final bool verbose; diff --git a/pkg/dartdev/lib/src/commands/compile.dart b/pkg/dartdev/lib/src/commands/compile.dart index bae371d59dab..08cee8b4f885 100644 --- a/pkg/dartdev/lib/src/commands/compile.dart +++ b/pkg/dartdev/lib/src/commands/compile.dart @@ -895,8 +895,8 @@ Sets the verbosity level of the compilation. flagDefaultsTo: true, ); - late final Option defineOption; - late final Option packagesOption; + final Option defineOption; + final Option packagesOption; CompileSubcommandCommand(super.name, super.description, super.verbose, {super.hidden}) diff --git a/pkg/dartdev/lib/src/dds_runner.dart b/pkg/dartdev/lib/src/dds_runner.dart index 71f99f4486e5..749f06259975 100644 --- a/pkg/dartdev/lib/src/dds_runner.dart +++ b/pkg/dartdev/lib/src/dds_runner.dart @@ -50,7 +50,7 @@ class DDSRunner { const devToolsMessagePrefix = 'The Dart DevTools debugger and profiler is available at:'; if (debugDds) { - late StreamSubscription stdoutSub; + late final StreamSubscription stdoutSub; stdoutSub = process.stdout.transform(utf8.decoder).listen((event) { if (event.startsWith(devToolsMessagePrefix)) { final ddsDebuggingUri = event.split(' ').last; @@ -61,7 +61,7 @@ class DDSRunner { } }); } - late StreamSubscription stderrSub; + late final StreamSubscription stderrSub; stderrSub = process.stderr.transform(utf8.decoder).listen((event) { final result = json.decode(event) as Map; final state = result['state']; diff --git a/pkg/dartdev/lib/src/generate_kernel.dart b/pkg/dartdev/lib/src/generate_kernel.dart index 00b4fc024c21..ea906bbfb7a6 100644 --- a/pkg/dartdev/lib/src/generate_kernel.dart +++ b/pkg/dartdev/lib/src/generate_kernel.dart @@ -150,7 +150,7 @@ Future ensureCompilationServerIsRunning( } try { Directory(p.dirname(serverInfoFile.path)).createSync(recursive: true); - late final Process frontendServerProcess; + final Process frontendServerProcess; if (File(sdk.frontendServerAotSnapshot).existsSync()) { frontendServerProcess = await Process.start( sdk.dartAotRuntime, diff --git a/pkg/dartdev/tool/sdk_size.dart b/pkg/dartdev/tool/sdk_size.dart index bf711a7efdb6..d6691779452b 100644 --- a/pkg/dartdev/tool/sdk_size.dart +++ b/pkg/dartdev/tool/sdk_size.dart @@ -11,13 +11,11 @@ import 'dart:io'; import 'package:path/path.dart' as p; -late final String dartSdkPath; +final String dartSdkPath = p.dirname(p.dirname(Platform.resolvedExecutable)); final List fileStats = []; void main(List arguments) { - final vm = Platform.resolvedExecutable; - dartSdkPath = p.dirname(p.dirname(vm)); final version = File(p.join(dartSdkPath, 'version')).readAsStringSync().trim();