spotify / XCRemoteCache

Other
825 stars 50 forks source link

How to enable index building cache? #160

Closed CharlieSuP1 closed 1 year ago

CharlieSuP1 commented 1 year ago

I have deployed XCRemoteCache in my project, thanx a lot!

When reading code of XCRemoteCache,I noticed that it supports for index caching:

action = (try? BuildActionType(rawValue: env.readEnv(key: "ACTION"))) ?? .unknown I just wondering is there any way to trigger index building in command-line,so that I can produce index cache with my ci machine?

polac24 commented 1 year ago

Hi! This code snippet you posted is used to recognize if the build is triggered for the same of "indexing" build - this property is later used only to correctly estimate "cache hit rate".

Context: Since Xcode 13, Xcode is no longer reusing the intermediate files from the build action to generate indexing symbols. Both indexing and build actions have exclusive intermediate files - so often the compilation step is duplicated on developer's machine. This technique is called indexing arena.

Coming back to your question, XCRemoteCache does not support caching indexing symbols. If you are interested in that, I could redirect you to https://github.com/MobileNativeFoundation/index-import.