[Xcode 15] GeneratedAssetSymbols in a framework or application target cause cache miss
polac24 opened this issue · comments
My integration setup
- CocoaPods cocoapods-xcremotecache plugin
- Automatic integration using
xcprepare integrate ...
- Manual integration
- Carthage
Expected/desired behavior
If a target has .xcassets
, a target should still be cacheable
Minimal reproduction of the problem with instructions
- Use Xcode 15 beta 1
- run E2E standalone test
- The test will fail with an error that the final target (
StandaloneApp
) had a cache miss
Consumer Logs
....
** BUILD SUCCEEDED ** [3.885 sec]
reverting e2eTests/StandaloneSampleApp
rake aborted!
Failure: Unexpected misses: 1 (4). Expected 0
/Users/bartosz/Development/XCRemoteCache/tasks/e2e.rb:251:in `valide_hit_rate'
Environment
- XCRemoteCache: 0.3.24
- cocoapods-xcremotecache: 0.0.16
- HTTP cache server: local nginx
- Xcode: Version 15.0 beta (15A5160n)
Others
A feature to generate assets references (known as R.), has been added in Xcode 15:
Xcode now generates Swift and Objective-C symbols for each color and image in the asset catalog. These symbols provide a safer, more assistive way to reference assets that’s resilient to renames & typos, leverages compiler type checking, and integrates with code completion.
- In the producer's
post_build
phase, the generated.swift
file is not listed as a dependency - on the consumer side, an unknown input file is reported and fallbacking to the local compilation happens
-
- A quick investigation shows that generating
GeneratedAssetSymbols.swift
andGeneratedAssetSymbols.h
happens after the prebuild step so these files cannot be considered in the prebuild phase to decide if a cached artifact is reusable or not, even if we add those 2 files (GeneratedAssetSymbols.{swift|h}) to the list of dependencies
- A quick investigation shows that generating
![Screenshot 2023-06-05 at 10 09 59 PM](https://private-user-images.githubusercontent.com/9629417/243552565-b7182f6d-5664-43ed-9ae2-b0a842cb4b4b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMxMjgwMjksIm5iZiI6MTcwMzEyNzcyOSwicGF0aCI6Ii85NjI5NDE3LzI0MzU1MjU2NS1iNzE4MmY2ZC01NjY0LTQzZWQtOWFlMi1iMGE4NDJjYjRiNGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQUlXTkpZQVg0Q1NWRUg1M0ElMkYyMDIzMTIyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyMzEyMjFUMDMwMjA5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDYxMDdmYmNiYWZmZmRhYjU1OGE5NjRhYmQ4MzY4NGVhODVkMDM2MTBiZDE3NDY1MDQ2NDg1MzEyMmNmNjJkZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.TQ4ZEvQ3KixHj5Zew7G_G5wOKXW71dQV-9MYjd_FJfw)