Skip to content

Skip xattr removal for Swift package cache - #186001

Merged
auto-submit[bot] merged 6 commits into
flutter:masterfrom
vashworth:xattr_skip_swift_cache
May 6, 2026
Merged

Skip xattr removal for Swift package cache#186001
auto-submit[bot] merged 6 commits into
flutter:masterfrom
vashworth:xattr_skip_swift_cache

Conversation

@vashworth

@vashworth vashworth commented May 4, 2026

Copy link
Copy Markdown
Contributor

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 the build directory.

After migrating to SwiftPM, we start storing remote Swift dependencies in the build/ios/SourcePackages directory. 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-assist bot 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.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 4, 2026
@github-actions github-actions Bot added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. team-ios Owned by iOS platform team team-macos Owned by the macOS platform team labels May 4, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 4, 2026
@vashworth vashworth added the CICD Run CI/CD label May 4, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 4, 2026
@vashworth vashworth added CICD Run CI/CD labels May 4, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, 035aa03a71e6779aa91319bc1ee725ebf0b19507, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@github-actions github-actions Bot removed the CICD Run CI/CD label May 4, 2026
@vashworth vashworth added the CICD Run CI/CD label May 4, 2026
@vashworth
vashworth marked this pull request as ready for review May 5, 2026 14:19
@vashworth
vashworth requested review from a team as code owners May 5, 2026 14:19

@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 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.

Comment thread packages/flutter_tools/lib/src/ios/mac.dart Outdated
Comment thread packages/flutter_tools/lib/src/ios/mac.dart Outdated
@vashworth vashworth added CICD Run CI/CD and removed CICD Run CI/CD labels May 5, 2026
hellohuanlin
hellohuanlin previously approved these changes May 5, 2026
}

/// Remove extended attributes from all files in the Flutter project, except the Swift package
/// cache in the build directory.

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.

... in the build directory, since it takes a long time. See https://github.com/flutter/flutter/issues/183662

@github-actions github-actions Bot removed the CICD Run CI/CD label May 5, 2026
@vashworth vashworth added the CICD Run CI/CD label May 5, 2026
@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label May 6, 2026
@vashworth vashworth mentioned this pull request May 6, 2026
10 tasks
@auto-submit
auto-submit Bot added this pull request to the merge queue May 6, 2026
Merged via the queue into flutter:master with commit e209bda May 6, 2026
162 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD platform-ios iOS applications specifically team-ios Owned by iOS platform team team-macos Owned by the macOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mimimize xattr usage

3 participants