Error when run periphery scan
Environment: Xcode 14 RC DerivedData data path: /Users/username/Library/Developer/Xcode/DerivedData MacBook Pro M1 Max
I didn't get the same issue on my old mac in case scanning the same project.
Error:
- Inspecting project...
- Building Zero...
- Indexing... error: (IndexStoreError) internalError("index store path does not exist: /Users/user/Library/Caches/com.github.peripheryapp/DerivedData-7c902665-7c902665/Index/DataStore")
I have the same issue on my M1 Pro after updating Xcode to 14.0 today.
Same here; the Index/DataStore path seems to have been removed from derived data's created in xcode14
Looks like Apple decided to add the .noindex extension to the Index folder within the DerivedData so it doesn't show up in Finder searches.
Would be fixed after this is merged: https://github.com/peripheryapp/periphery/pull/523
The index store at '/Users/shikisuen/Library/Caches/com.github.peripheryapp/DerivedData-81888ae0-fc2689f0/Index.noindex/DataStore' does not contain the data...
This is the error generated while using the periphery built from the commit bf256b9 .
Looks like Apple decided to add the .noindex extension to the Index folder within the DerivedData so it doesn't show up in Finder searches.
Would be fixed after this is merged: #523
Now merged, now let's hope a new build will be released soon
Well, if you're a little impatient (like I am), you can do this in the DerivedData folder:
rm -rf Index
ln -s Index.noindex Index
This tricks periphery 2.9.0 into working with Xcode 14. Not ideal but a temporary fix for the issue.
@tatewake does that workaround work with xcode integration or just when calling periphery from command line?
Should work regardless of how you installed periphery.
Wasn't working but someone left a comment (now deleted) indicating I should run it inside the project folder, not just at the root of DerivedData 🤦 also in my case the path was ~/Library/Caches/com.github.peripheryapp/DerivedData-*. Works now, thanks!
Still does not work for me. Could you post full solution @gsbernstein ? 🙏
@krzys-bfi Try cd-ing into the folder where you get the error (for me it was /Users/user/Library/Caches/com.github.peripheryapp/DerivedData-xxxxxx-xxxx) and run the commands from @tatewake 's comment . Worked for me
Worked for me, thanks @tatewake
This is now fixed in v2.10.0.
Hi, I am using currently v2.10.0 but I still face the same issue.
And I can't install / upgrade to 2.10.0, the latest on brew seems to be 2.8.1
@emanuelcaesar Can you please provide the path that Periphery is attempting to load (from the error message) and the correct location of the index store?
@micHar What command are you running to update? The latest version is defined here: https://github.com/peripheryapp/homebrew-periphery/blob/master/Casks/periphery.rb
DerivedData dirs are now keyed with the Xcode version hash in 2.10.3, so this should now be resolved.
I still have this issue on my project with Apple Watch support. The Datastore is there in the correct folder, but I still get Source file not indexed on my project files.
@ileitch can we reopen this issue? seems we're still having the derived data index problem:
.periphery.yml
retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace
➜ TestApp git:(develop) ✗ periphery scan --verbose
[version] 2.12.0
[shell] /bin/zsh -lc env
[shell] /usr/bin/env swift -version
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: x86_64-apple-macosx12.0
[shell] /usr/bin/env xcodebuild -version
Xcode 14.2
Build version 14C18
[configuration:begin]
retain_objc_accessible: true
retain_public: true
schemes:
- TestApp
targets:
- TestApp
verbose: true
workspace: TestApp.xcworkspace
[configuration:end]
* Inspecting project...
[xcode:workspace] Loading ~/Documents/test/TestApp/TestApp.xcworkspace
[xcode:project] Loading ~/Documents/test/TestApp/TestApp.xcodeproj
[xcode:project] Loading ~/Documents/test/TestApp/TestApp/Pods/Pods.xcodeproj
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -list -json
* Building TestApp...
[shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -showBuildSettings -scheme TestApp build test
[shell] /bin/sh -c xcodebuild -workspace '~/Documents/test/TestApp/TestApp.xcworkspace' -scheme 'TestApp' -parallelizeTargets -derivedDataPath '~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729' -quiet build CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" DEBUG_INFORMATION_FORMAT="dwarf"
* Indexing...
error: Failed to find index datastore at path: ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729
➜ TestApp git:(develop) ✗ ls ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729 Build Logs ModuleCache.noindex info.plist
@ileitch can we reopen this issue? seems we're still having the derived data index problem:
.periphery.yml
retain_objc_accessible: true retain_public: true schemes: - TestApp targets: - TestApp verbose: true workspace: TestApp.xcworkspace➜ TestApp git:(develop) ✗ periphery scan --verbose
[version] 2.12.0 [shell] /bin/zsh -lc env [shell] /usr/bin/env swift -version swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) Target: x86_64-apple-macosx12.0 [shell] /usr/bin/env xcodebuild -version Xcode 14.2 Build version 14C18 [configuration:begin] retain_objc_accessible: true retain_public: true schemes: - TestApp targets: - TestApp verbose: true workspace: TestApp.xcworkspace [configuration:end] * Inspecting project... [xcode:workspace] Loading ~/Documents/test/TestApp/TestApp.xcworkspace [xcode:project] Loading ~/Documents/test/TestApp/TestApp.xcodeproj [xcode:project] Loading ~/Documents/test/TestApp/TestApp/Pods/Pods.xcodeproj [shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -list -json * Building TestApp... [shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -showBuildSettings -scheme TestApp build test [shell] /bin/sh -c xcodebuild -workspace '~/Documents/test/TestApp/TestApp.xcworkspace' -scheme 'TestApp' -parallelizeTargets -derivedDataPath '~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729' -quiet build CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" DEBUG_INFORMATION_FORMAT="dwarf" * Indexing... error: Failed to find index datastore at path: ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729➜ TestApp git:(develop) ✗ ls ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729 Build Logs ModuleCache.noindex info.plist
Same issue with Xcode 14.2 (14C18).
@ileitch can we reopen this issue? seems we're still having the derived data index problem: .periphery.yml
retain_objc_accessible: true retain_public: true schemes: - TestApp targets: - TestApp verbose: true workspace: TestApp.xcworkspace➜ TestApp git:(develop) ✗ periphery scan --verbose
[version] 2.12.0 [shell] /bin/zsh -lc env [shell] /usr/bin/env swift -version swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51) Target: x86_64-apple-macosx12.0 [shell] /usr/bin/env xcodebuild -version Xcode 14.2 Build version 14C18 [configuration:begin] retain_objc_accessible: true retain_public: true schemes: - TestApp targets: - TestApp verbose: true workspace: TestApp.xcworkspace [configuration:end] * Inspecting project... [xcode:workspace] Loading ~/Documents/test/TestApp/TestApp.xcworkspace [xcode:project] Loading ~/Documents/test/TestApp/TestApp.xcodeproj [xcode:project] Loading ~/Documents/test/TestApp/TestApp/Pods/Pods.xcodeproj [shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -list -json * Building TestApp... [shell] /usr/bin/env xcodebuild -workspace ~/Documents/test/TestApp/TestApp.xcworkspace -showBuildSettings -scheme TestApp build test [shell] /bin/sh -c xcodebuild -workspace '~/Documents/test/TestApp/TestApp.xcworkspace' -scheme 'TestApp' -parallelizeTargets -derivedDataPath '~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729' -quiet build CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" DEBUG_INFORMATION_FORMAT="dwarf" * Indexing... error: Failed to find index datastore at path: ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729➜ TestApp git:(develop) ✗ ls ~/Library/Caches/com.github.peripheryapp/DerivedData-72ff7eee-acef5729-acef5729 Build Logs ModuleCache.noindex info.plist
Same issue with Xcode 14.2 (14C18). If I added --clean-build option, it will be fixed but need more build time.
rm -rf Index ln -s Index.noindex Index
What needs to be done in order to und these changes?
rm -rf Index ln -s Index.noindex Index
What needs to be done in order to und these changes?
You can just delete the symbolic link it created. Or if derived data ever gets in a weird state, you can delete the whole directory and it will regenerate.
@ZeroOnet Your error is different than the original, you appear to be missing the Index directory entirely, which is very odd. Do you have COMPILER_INDEX_STORE_ENABLE disabled? I think some CI services disable it by default.