Skip to content

Clean Up treats unrelated Derived Data as in use by xcodebuild #896

Done

Description

@anciltech

Description

In Xcodes 4.2.0 (42), Clean Up reported unrelated Derived Data entries as “In use by xcodebuild,” including project caches and shared-cache folders. The running build used an explicit Derived Data directory outside the selected cleanup location. The resulting alert listed the same reason for dozens of items.

Reproduction

  1. Start an xcodebuild command with an explicit absolute -derivedDataPath outside the default Derived Data folder.
  2. Open Xcodes → Clean Up and select unrelated entries from the default Derived Data folder.
  3. Confirm cleanup. The running build is treated as using all of those entries.

Expected behavior

When the build’s Derived Data location can be established, protect overlapping paths and allow unrelated entries to proceed. Retain the conservative guard for builds whose location cannot be established. Keep the cleanup alert compact and make the full list copyable.

Validation update

All 44 cleanup tests also passed in the combined test build used for the live Xcode and simulator reinstall. The cleanup guard was checked against a live build with a separate Derived Data path. Cleanup operations themselves used fixtures and injected file operations.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions