Skip to content

Prepare for long filenames in Flutter repo#9888

Merged
srawlins merged 2 commits into
flutter:masterfrom
srawlins:longfiles
Jul 13, 2026
Merged

Prepare for long filenames in Flutter repo#9888
srawlins merged 2 commits into
flutter:masterfrom
srawlins:longfiles

Conversation

@srawlins

Copy link
Copy Markdown
Contributor

While moving this repo to the Dart SDK, I hit this error on the windows bots:

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8676373343835221969/+/u/build_devtools/stdout?format=raw

Cloning Flutter into C:\b\s\w\ir\cache\builder\sdk\third_party\devtools_src\tool\flutter-sdk
C:\b\s\w\ir\cache\builder\sdk\third_party\devtools_src\tool > git clone https://github.com/flutter/flutter flutter-sdk
Cloning into 'flutter-sdk'...
...
error: unable to create file 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: Filename too long
Updating files:  57% (9162/16073)
error: unable to create file engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprect_with_transform_multiple_clips_impeller_iPhone SE (3rd generation)_26.2_simulator.png: Filename too long
error: unable to create file engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_cliprrect_with_transform_multiple_clips_impeller_iPhone SE (3rd generation)_26.2_simulator.png: Filename too long
error: unable to create file engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/ScenariosUITests/golden_platform_view_large_cliprrect_with_transform_multiple_clips_impeller_iPhone SE (3rd generation)_26.2_simulator.png: Filename too long
...
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.

In this PR, I skip checking out 'master' on the 'git clone' command. Then run 'git config core.longpaths true' before checking out the appropriate commit.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Flutter SDK update command to clone the repository with --no-checkout and configure core.longpaths to true on Windows to prevent "Filename too long" errors. It also adds a doc comment to runAll in tool/lib/utils.dart. The review feedback points out that if a developer already has the SDK directory cloned, they will bypass the clone block and go straight to checkout, which could still fail if core.longpaths is not set. It is recommended to also run the git configuration in the update path.

Comment thread tool/lib/commands/update_flutter_sdk.dart Outdated
// 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([

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just run this once before the if / else statement instead of calling it in each block?

@kenzieschmoll kenzieschmoll left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm w/ one question

@srawlins srawlins merged commit a469731 into flutter:master Jul 13, 2026
51 checks passed
@srawlins srawlins deleted the longfiles branch July 13, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants