index-import
index-import copied to clipboard
Need Help In Depth for Integration Guide
Hi, I'm trying to integrate this into my bazel local project. Need your help to understand better on how integrating this and clear my own assumptions so I'm in the right track. What I understand, to integrate this library:
- Create
dummy target
in the Xcode for bazel local project. The target name should be the same with your module. (CMIIW). Why we need thisdummy target
? Target is required by Xcode to create indexing. Xcode also automatically create folders insideDerivedData
based by these targets. (for example<module_name>.build
folders) - Add this script into your main target (target where you have
Bazel Build
script running). Add this after theBazel Build
script. - When Bazel is compiling the project, it will create indexstore (if you enabled it by adding
build --features="swift.index_while_building"
flag in.bazelrc
) insidebazel-out
folder. - To properly create indexing, we need to add some files in the
bazel-out/**/*.indexstore/*
into"$BUILD_DIR"/../../Index/DataStore
. Also, some objects compiled by Bazel needs to be moved toDerivedData
, by usingindex-import
lib.
Up to this step I have hard times to detect if index-import
is properly working or not. I managed to get all indexstores
into "$BUILD_DIR"/../../Index/DataStore
but I can't see some of the compiled objects for swift or objc in the "$CONFIGURATION_TEMP_DIR/\$1.build/Objects-normal/$BUILD_ARCH/\$2.o"
folder.
- Does the
remap
option inindex-import
creates directory if it's not exist? What does theremap
option do? - Since there are no failures or any output, how can I debug the missing objc and swift objects in
"$CONFIGURATION_TEMP_DIR/\$1.build/Objects-normal/$BUILD_ARCH/\$2.o"
?