From 105e4e8847d91684426417d5765443368d3e5338 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 13 Jul 2026 10:53:11 -0700 Subject: [PATCH 1/2] Prepare for long filenames in Flutter repo --- tool/lib/commands/update_flutter_sdk.dart | 7 +++++++ tool/lib/utils.dart | 1 + 2 files changed, 8 insertions(+) diff --git a/tool/lib/commands/update_flutter_sdk.dart b/tool/lib/commands/update_flutter_sdk.dart index ab118763126..245690c94b0 100644 --- a/tool/lib/commands/update_flutter_sdk.dart +++ b/tool/lib/commands/update_flutter_sdk.dart @@ -101,6 +101,7 @@ class UpdateFlutterSdkCommand extends Command { await processManager.runProcess( CliCommand.git([ 'clone', + '--no-checkout', 'https://github.com/flutter/flutter', flutterSdkDirName, ]), @@ -108,6 +109,12 @@ class UpdateFlutterSdkCommand extends Command { ); await processManager.runAll( commands: [ + // On Windows LCUI trybots, some of the flutter repo paths cause + // "Filename too long" errors. Filenames such as: + // engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/ + // ScenariosUITests/ + // golden_platform_view_clippath_with_transform_multiple_clips_impeller_iPhone SE (3rd generation)_26.2_simulator.png'. + CliCommand.git(['config', 'core.longpaths', 'true']), CliCommand.git(['checkout', flutterVersion, '-f']), CliCommand.flutter(['--version']), ], diff --git a/tool/lib/utils.dart b/tool/lib/utils.dart index bc8d85a1027..97e3b593e2b 100644 --- a/tool/lib/utils.dart +++ b/tool/lib/utils.dart @@ -163,6 +163,7 @@ extension DevToolsProcessManagerExtension on ProcessManager { ); } + /// Runs [commands] in serial, from [workingDirectory]. Future runAll({ required List commands, String? workingDirectory, From 5ecf616d5dba0ac9f206d933efd99d13bb934a88 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 13 Jul 2026 11:04:47 -0700 Subject: [PATCH 2/2] move --- tool/lib/commands/update_flutter_sdk.dart | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tool/lib/commands/update_flutter_sdk.dart b/tool/lib/commands/update_flutter_sdk.dart index 245690c94b0..73a95f5070c 100644 --- a/tool/lib/commands/update_flutter_sdk.dart +++ b/tool/lib/commands/update_flutter_sdk.dart @@ -86,10 +86,23 @@ class UpdateFlutterSdkCommand extends Command { } // Next, update (or clone) the tool/flutter-sdk copy. + + // On Windows LCUI trybots, some of the flutter repo paths cause + // "Filename too long" errors. Filenames such as: + // engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/ + // ScenariosUITests/ + // golden_platform_view_clippath_with_transform_multiple_clips_impeller_iPhone SE (3rd generation)_26.2_simulator.png'. + final gitLongFilesCommand = CliCommand.git([ + 'config', + 'core.longpaths', + 'true', + ]); + if (Directory(toolSdkPath).existsSync()) { log.stdout('Updating Flutter at $toolSdkPath'); await processManager.runAll( commands: [ + gitLongFilesCommand, CliCommand.git(['fetch']), CliCommand.git(['checkout', flutterVersion, '-f']), CliCommand.flutter(['--version']), @@ -109,12 +122,7 @@ class UpdateFlutterSdkCommand extends Command { ); await processManager.runAll( commands: [ - // On Windows LCUI trybots, some of the flutter repo paths cause - // "Filename too long" errors. Filenames such as: - // engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/ - // ScenariosUITests/ - // golden_platform_view_clippath_with_transform_multiple_clips_impeller_iPhone SE (3rd generation)_26.2_simulator.png'. - CliCommand.git(['config', 'core.longpaths', 'true']), + gitLongFilesCommand, CliCommand.git(['checkout', flutterVersion, '-f']), CliCommand.flutter(['--version']), ],