spotify / XCRemoteCache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot remove DerivedData folder once marked a build

OliverKoo opened this issue · comments

My integration setup

[X] Automatic integration using xcprepare integrate ...

Expected/desired behavior
Able to rm -rf ~/Library/Developer/Xcode/DerivedData.
Even if removed it seems to repopulate itself.

Context:
I am considering bringing in XCRemoteCache into our organization, so I am doing some benchmarking locally, therefore I need to clear DerviedData locally after built with producer mode and build again with consumer mode without DerivedData present.

Minimal reproduction of the problem with instructions

  1. follow the auto integrated steps
  2. be in producer mode
  3. do a successful build with xcodebuild
  4. mark xcremotecache/xcprepare mark --configuration Debug --platform iphonesimulator
  5. rm -rf ~/Library/Developer/Xcode/DerivedData
➜  /Users/okoo/Code/ios git:(master) ✗ rm -rf ~/Library/Developer/Xcode/DerivedData
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/MyProj-exwneyqxzopphodwxkfkatpczygl/Index.noindex/DataStore/v5/records: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/MyProj-exwneyqxzopphodwxkfkatpczygl/Index.noindex/DataStore/v5/units: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/MyProj-exwneyqxzopphodwxkfkatpczygl/Index.noindex/DataStore/v5: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/MyProj-exwneyqxzopphodwxkfkatpczygl/Index.noindex/DataStore: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/MyProj-exwneyqxzopphodwxkfkatpczygl/Index.noindex: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/MyProj-exwneyqxzopphodwxkfkatpczygl: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/YH4HN3D4DJSP: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData/ModuleCache.noindex: Permission denied
rm: /Users/okoo/Library/Developer/Xcode/DerivedData: Permission denied

Environment

  • XCRemoteCache: 0.3.23
  • HTTP cache server: ... demo docker
  • Xcode: 14.2

Hi! Why do you think it is related to XCRemoteCache? Do files have unexpected owner, permissions?
Xcode extensively writes to that directory and XCRemoteCache doesn't run any daemons that might write to these locations.

I would double-check that you don't have any Xcode instances running, as that looks like some indexing process (owned by Xcode) is writing to that directory.

Hi! you were right, it was not related to XCRemoteCache it was due to Xcode running indexing when I switch branch! Closing this issue