spotify / XCRemoteCache

Other
830 stars 53 forks source link

json file contains direct paths #59

Closed DRybochkin closed 2 years ago

DRybochkin commented 2 years ago

image

polac24 commented 2 years ago

Can you provide more steps to reproduce? I see that you use Pods but the following Podfile doesn't reproduce it:

target 'Name' do
  use_frameworks!
  pod 'ReactiveSwift'
end

I assume that /Users/*/ is just a redacted username. Do you have any non-ascii chars in the username maybe?

Am I right that you have some out_of_band_mappings replacements with SUPER_TARGET_SRCROOT. Do you think it may cause this issue?

DRybochkin commented 2 years ago

yes it is a redacted username and username does not have any non-ascii chars

DRybochkin commented 2 years ago

I don't think so, because if you comment out_of_band_mappings, then the direct path to the folder with the developer modules will appear, and the path to module.modulemap will not change

./ProjectFolder ./ProjectFolder/DeveloperPodsSourse <=> SUPER_TARGET_SRCROOT ./ProjectFolder/Pods

in my opinion this happens because BUILD_DIR = DerrrivedData/../Build/Products and module.modulemap is in DerrivedData/../Intermediates.noindex/Pods.build which is not replaced

Build location is default

image

polac24 commented 2 years ago

I recall that error but AFAIR it was always my misconfiguration. Keep in mind that there is a cache on your local machine at ~/Library/Caches/XCRemoteCache and it may contain some outdated (aka polluted) entries.

Tip: When playing with XCRemoteCache and/or trying to integrate it into a new project, I always set artifact_maximum_age:0 to practically disable the local cache. It might be a case.

DRybochkin commented 2 years ago

https://github.com/DRybochkin/TestXCRC Link to the test project where the error is reproduced

if add "PROJECT_TEMP_ROOT" to DependenciesMapping that works excellent where "PROJECT_TEMP_ROOT" is a link to DerrrivedData/[UniqueProjectDir]

polac24 commented 2 years ago

Thanks for the project. I was able to reproduce it. When dynamic libraries are used, Xcode passes vfsoverlays configuration to the swift compiler but XCRemoteCache doesn't substitute the underlying raw file with the overlay's location (in Products). This is definitely a missing feature that XCRemoteCache should cover.