MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj

Bug: invalid index store directory when using `swift.split_derived_files_generation`

Open
#3,264 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
626
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Description

Noticed this internally and managed to repro in main => 79f26ec1315531a8459fe95934440cb3ca3c16df.

In the indexing logs I see this failure and confirmed that the .indexstore directory is not present on disk indeed:

Image

Confirmed that the issue happens only if

common --features=swift.split_derived_files_generation

is present in the .bazelrc file.

Also noticed that this seems related to mixed_language_library since the issue goes away if I force the failing target to be a swift_library instead.

Last, it's not clear to me if this is a harmless failure or not as I see normal indexing behaviour (auto-complete, jump to def) working normally even with the .indexstore directory being non-existent.

Reproduction steps
  • Checkout main => 79f26ec1315531a8459fe95934440cb3ca3c16df
  • cd examples/integration
  • Add common --features=swift.split_derived_files_generation to examples/integration/.bazelrc
  • bazel clean --expunge
  • bazel run :xcodeproj-sim_arm64
  • open Integration.xcodeproj
  • Observe the indexing logs
Expected behavior

No indexing errors in the logs

rules_xcodeproj version

79f26ec1315531a8459fe95934440cb3ca3c16df

Xcode version

26.0.1

Bazel version

repro-ed in both 7.x and 8.x

rules_apple version

4.0.1

rules_swift version

3.1.1

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce from examples/integration/.bazelrc using common --features=swift.split_derived_files_generation, then run bazel run :xcodeproj-sim_arm64 and inspect the indexing logs. Compare the mixed_language_library path with forcing the target to swift_library; done means the generated Xcode project produces no invalid index store directory errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.