Skip xattr removal for Swift package cache - #186001
Conversation
|
An existing Git SHA, To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with |
There was a problem hiding this comment.
Code Review
This pull request introduces removeExtendedAttributesForProject to handle the removal of extended attributes across the Flutter project while excluding the build directory and Swift package cache. It refactors XcodeProjectInterpreter to provide the Swift package cache path and updates numerous tests, including the addition of an unordered FakeProcessManager to support non-deterministic command ordering. The review feedback suggests using fileSystem.path.equals for more robust path comparisons when filtering directories during the attribute removal process.
| } | ||
|
|
||
| /// Remove extended attributes from all files in the Flutter project, except the Swift package | ||
| /// cache in the build directory. |
There was a problem hiding this comment.
... in the build directory, since it takes a long time. See https://github.com/flutter/flutter/issues/183662
We run
xattr -r -d [insert attr]twice for the entire project. This command recursively tries to remove extended attributes from all files in the project, including thebuilddirectory.After migrating to SwiftPM, we start storing remote Swift dependencies in the
build/ios/SourcePackagesdirectory. This can be GB worth of files. This makes the command slow.To work around this, this PR changes it so we skip running the command on the directory and also skips running it for non-iOS build directories.
Fixes #183662.
Before: ~7.169s
After: ~0.168s
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.