spotify / XCRemoteCache

Other
833 stars 52 forks source link

Produce step .d file for indexbuild #7

Closed polac24 closed 2 years ago

polac24 commented 2 years ago

When Xcode calls indexbuild action, we should create a valid .d (make-style dependency file), otherwise Xcode fails a build with an error like:

unable to open dependencies file ({redacted}/Index/Build/Intermediates.noindex/{redacted}.build/prebuild.d)
Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure

This PR asks modeControllers to disable a cache, which is a legal way to disable the remote cache flow and fallback other wrappers (like xcswiftc, xccc etc.) to the local build.

Minor: do not print the output to the user, just logging a message that is stored in system logs.