Open samuelsainz opened 2 years ago
Hello! The second error comes from the Indexing build - probably Debug is the configuration that Xcode uses. Xcode 13 introduced a new feature: indexing arena that builds the target in isolation and its output is used to power only Xcode's indexing.
You can preview commands used in the indexing arena in Xcode (report navigator tab), but first you need to enable it (Xcode restart needed):
defaults write com.apple.dt.Xcode IDEIndexShowLog -bool YES
To troubleshoot exclude_build_configurations
, can you check your Xcode's project for the ZIPFoundation
and double check that the SWIFT_EXEC
build setting is not set for the Debug configuration (most likely empty). I would expect something like that:
It seems that the Debug configuration is correctly excluded, I am seeing the swiftc
value for it which makes sense:
But it is still trying to get "Debug" artifacts as well looking at the logs.
This is not critical though since for the right configuration I am getting 100% cache hit, but I am wondering why is doing that and if it affects the performance somehow.
Get it: to have a clean hit rate (we have separated indexing hit counts anyway) and not unnecessary generate HTTP requests, we could add some king of bail out logic to the XcodeProjIntegrate
when a configuration that should be disabled has been recognized (e.g. comparing CONFIGURATION
env in the shell script).
Contribution PR is welcome!
My integration setup
xcprepare integrate ...
Expected/desired behavior
I'm building the app with a build configuration named "Debug Enterprise"—correctly selected in the scheme that I'm building. Sometimes
xcprebuild
get the artifacts without problems building the URL like this:https://artifactory.svc.appname.com/artifactory/mobile-ios-xcremotecache/v1/beta/meta/d1fdee5c8b5540b44341a61b1b57ed7d328dd1bf-TargetNameX-Debug%20Enterprise-iphonesimulator-13C100-4b7e99cf543c0cbccbd4df6a462ca769.json
But in some cases I am seeing the next error:
Network request failed with unsuccessful code 404
. Looking at the logs I saw that for those artifactsxcprebuild
is using the wrong URL to get the artifact—containing a wrong configuration:https://artifactory.svc.appname.com/artifactory/mobile-ios-xcremotecache/v1/beta/meta/d1fdee5c8b5540b44341a61b1b57ed7d328dd1bf-TargetNameY-Debug-iphonesimulator-13C100-192149891c1951efa6af7f819e0d90bc.json
The configuration is
Debug
instead ofDebug%20Enterprise
.Minimal reproduction of the problem with instructions
It happens randomly, I wasn't able to figure out how to reproduce it. Sometimes it happens for all the Artifacts and some times it happens just for some of them.
Producer Logs
N/A
Consumer Logs
Environment
Post build stats
Others
I tried to debug this but I am struggling with debugger not stoping at the breakpoints, I already tried everything in #103
When I expand the
[XCRC] Prebuild TargetName
script for one of these targets (using the hamburger button in Xcode log) the export command for CONFIGURATION var is "Debug\ Enterprise" as expected.I tried also using the
exclude_build_configurations
config for the plugin (adding 'Debug' to that list) but it didn't work.I appreciate any help you could give me to troubleshoot this. Thanks in advance