Closed canhth closed 1 year ago
Hi @polac24, May I ask about your thought/idea to fix this issue? My team has disabled RemoteCache to make the CI works again.
Xcode 14 changed the way Swift's SPI is generated and produces .private.swiftinterface
for Library evolution/distributable mode, next to the .swiftinterface
file.
You can either disable the evolution mode in that MoonImCoreSwift
(which is always recommended unless you really want to distribute that library) or try to fix XCRemoteCache. Hopefully, that change will be simple, something like here
I tried to reproduce the error in a sample project but couln;t find a way to force swift compiler relying on a .private.swiftinterface but at glance, it looks, it will just work.
Sidenote: I also included in a commit bundling abi.json. Don't know if that is required in Xcode 14 so if you have a real-world project, you can check that too.
Hi @polac24,
Yes, you're right.
The error is gone when disabling BUILD_LIBRARY_FOR_DISTRIBUTION
option for MoonImCoreSwift
.
But I am afraid the other team won't accept that option, there must be some reason that they enabled it for Flutter package.
I tried your branch here, generate the release package, and replace it with my real project.
'product_files_extensions_with_content_override' => ["swiftmodule", "h", "private.swiftinterface", "abiJson"]
Unfortunately, it doesn't work. Or did I miss something?
I think you don't need to add anything to product_files_extensions_with_content_override
, updating the producer and consumer's XCRemoteCache library from a branch should be enough.
If that still doesn't work: make sure the zip file the producer creates for MoonImCoreSwift
contains .private.swiftinterface
next to the .swiftinterface
.
Hi @polac24 ,
Yes, the zip producer of MoonImCoreSwift
contains all the new options (abi.json, private.swiftinterface).
Hmmm, can you double-check that your local cache is not reusing previous artifacts on the consumer sides (e.g. nuke ~/Library/Caches/XCRemoteCache
or artifact_maximum_age: 0
in .rcinfo)?
I wrote some tests and everything seems to play well with that. Created even a PR: #175. If that doesn't work, probably you have to debug it locally: https://github.com/spotify/XCRemoteCache/blob/master/docs/FAQ.md
Hi @polac24,
It works after I clear the local cache. Thanks a lot.
May I ask when we can have a New Release
contains this PR?
The issue was getting the wrong fileKey
.
(the producer job still running every day, maybe it always fetch the latest fileKey which does not support .private.swiftinterface
yet)
once we get +1 review, I can make a new release. Probably that will be in 2-3 days.
to workaround, maybe you can:
artifact_maximum_age:1
and nuke your remote cache server's storage. After day-two, you can move artifact_maximum_age
to the previous value.
My integration setup
Problem description
(MoonImCoreSwift is the source code compile pod)
Questions
Environment