Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Help In Depth for Integration Guide #62

Open
hendych opened this issue May 12, 2022 · 0 comments
Open

Need Help In Depth for Integration Guide #62

hendych opened this issue May 12, 2022 · 0 comments

Comments

@hendych
Copy link

hendych commented May 12, 2022

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:

  1. Create dummy target in the Xcode for bazel local project. The target name should be the same with your module. (CMIIW). Why we need this dummy target? Target is required by Xcode to create indexing. Xcode also automatically create folders inside DerivedData based by these targets. (for example <module_name>.build folders)
  2. Add this script into your main target (target where you have Bazel Build script running). Add this after the Bazel Build script.
  3. 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) inside bazel-out folder.
  4. 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 to DerivedData, by using index-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 in index-import creates directory if it's not exist? What does the remap 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"?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant