Open Coder-Star opened 1 month ago
Hello! XcRemoteCache doesn’t change anything in the logs area, so it might be either Xcode’s issue or you read the file too early.
I know XcMetrics uses a strategy to spin until the file is a valid gzip as Xcode takes some time to serialize everything.
Hello! XcRemoteCache doesn’t change anything in the logs area, so it might be either Xcode’s issue or you read the file too early.
- Does the file eventually become a valid gzip?
- If you fully close Xcode after “cache hit”, does it print logs of the moat recent build?
I know XcMetrics uses a strategy to spin until the file is a valid gzip as Xcode takes some time to serialize everything.
I know that XcMetrics will wait for a certain amount of time to ensure that the log is fully written. I wait for the log to be fully written before verifying it, and once I close XCRemote Cache, the log will return to normal
In XCMetrics we don’t wait but spin in a loop https://github.com/spotify/XCMetrics/blob/e1a728a2ca046d8b35a1c4b4f7e04c6758705322/Sources/XCMetricsClient/Log%20Management/LogCopier.swift#L37
If the file eventually becomes a valid zip, you can apply the same strategy.
In XCMetrics we don’t wait but spin in a loop https://github.com/spotify/XCMetrics/blob/e1a728a2ca046d8b35a1c4b4f7e04c6758705322/Sources/XCMetricsClient/Log%20Management/LogCopier.swift#L37
If the file eventually becomes a valid zip, you can apply the same strategy.
I know the principle of XCMetrics, maybe it's because I didn't express myself clearly earlier, and I'm also using XCMetrics.
It's unbelievable that the result did indeed affect me, and I didn't think of any possible reasons
Get it, didn’t assume you are on XCMetrics.
That looks like an issue with Xcode/Xcmetrics, so I would start with creating a ticket there and/or a feedback to Xcode (however xcactivitylog isn’t a public api).
Get it, didn’t assume you are on XCMetrics.
That looks like an issue with Xcode/Xcmetrics, so I would start with creating a ticket there and/or a feedback to Xcode (however xcactivitylog isn’t a public api).
The main puzzling thing is that once I close the cache, the logs return to normal 😂😂
My integration setup
[✅ ] CocoaPods cocoapods-xcremotecache plugin [ ] Automatic integration using
xcprepare integrate ...
[ ] Manual integration [ ] CarthageExpected/desired behavior
Minimal reproduction of the problem with instructions
Producer Logs
Consumer Logs
Pods/Carthage file
Environment
gem list cocoapods-xcremotecache
>Post build stats
Others
When the consumer hits the cache, The xcactivitylog file is incomplete. When I execute gzip - t xx.xcactivitylog, it prompts unexpected end of file