Skip to content

Scope xcodebuild cleanup protection to active Derived Data - #898

Open
anciltech wants to merge 1 commit into
XcodesOrg:mainfrom
anciltech:fix/cleanup-build-scope
Open

anciltech wants to merge 1 commit into
XcodesOrg:mainfrom
anciltech:fix/cleanup-build-scope

Conversation

@anciltech

@anciltech anciltech commented Nov 16, 2026 •

Copy link
Copy Markdown

Fixes #896

Clean Up currently checks whether an xcodebuild process exists and blocks every selected Derived Data entry. With explicit absolute -derivedDataPath arguments, it now protects the paths that overlap an active build's Derived Data. An unreadable or ambiguous build path retains the broad guard. The checks for other active tools and cleanup categories still apply.

Long cleanup errors show a short preview with Copy Details to preserve the full list of skipped items.

Validation

  • All 44 CleanupOperationsTests passed on macOS with Xcode 27.3 beta. The tests use mock defaults to avoid reading or changing the installed app's cached cleanup results.
  • Verified the argument reader against a live xcodebuild using a separate Derived Data directory. Tests use fixtures and injected file operations for cleanup.

Combined build validation

All 44 cleanup tests passed again in the combined build containing this PR and #897. The combined build was also used to reinstall Xcode 27.3 beta and its iOS and watchOS runtimes. That live run covered installation; cleanup operations were verified with test fixtures.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean Up treats unrelated Derived Data as in use by xcodebuild

1 participant