Closed xuyuheng closed 1 year ago
@xuyuheng, can you provide more details, e.g. if you also pass -debug-prefix-map
or If that issue is exclusive to Xcode 14?
@polac24
All case test in same target,with xcremotecache and non-xcremotecache xcodeproj in same time.
@xuyuheng, I built a project that tries to reproduce that but it works for me (Xcode 14). Here is the sample project with a script to follow: https://github.com/polac24/XCRCReportingDemo/tree/call-usage
I recommend enabling indexing logs in Xcode and observing the process of indexing (Xcode restart required). It is possible that local indexing is still in progress:
defaults write com.apple.dt.Xcode IDEIndexerActivityShowNumericProgress -bool YES
defaults write com.apple.dt.Xcode IDEIndexShowLog -bool YES
@polac24 sample project work for me (Xcode 14). I continue test my project, my project's xcremotecache modified, automatically change to offline mode when no artifacts available for producing xccc file.
@polac24 issue can be reproduced by manual changing -fdebug-prefix-map=/private/tmp/DemoReferences=$(XCRC_FAKE_SRCROOT)
to -fdebug-prefix-map=$(SRCROOT)=$(XCRC_FAKE_SRCROOT)
with sample project, $(SRCROOT)
is used in cocoapods-xcremotecache plugin.
@xuyuheng, can you elaborate?
The "starting" project doesn't have any -fdebug-prefix-map
build settings so all -fdebug-prefix-map
BuildSettings you have in a consumer mode are introduced by cocoapods-xcremotecache plugin.
Why manually modify that?
@polac24 my project use Pods with cocoapods-xcremotecache, i'm trying to fix "Call Hierarchy" problem. in consumer mode, after pod install, -fdebug-prefix-map will automatically add with $(SRCROOT)
, in this case, lead to "Call Hierarchy" issue.
By the way, call-usage branch also has -fdebug-prefix-map by default.
@xuyuheng,
I guess you may face an issue because /tmp
is not a good location to place your sample project. Technically, on macOS, /tmp
is just a symbolic link to private/tmp
and as written in the XCRemoteCache requirements, that is not recommended
Recommended: avoid having a symbolic link in the source root (e.g. placing a project in /tmp)
I suggest cloning the repo somewhere else and checking if you can reproduce a problem because then $(SRCROOT)
should resolve to the same location as expected.
@polac24 i test https://github.com/polac24/XCRCReportingDemo/tree/call-usage
project again with you suggestion, and reproduce problem by removing Xcode DerivedData/DemoReferences-hhvspvruhrwwongeahnrcwnlqxjd
directory before continue "2. Preparing for a consumer step....". Compare to producer mode, consumer mode missing DataStore
and UniDB
index directory.
I looked at that again:
/tmp
. I cleaned that up here
Use
-fdebug-prefix-map
in Xcode project, Xcode 14 Find Call Hierarchy always show "No Call Result for".