MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj
Bug: same indexstore is imported two times with different targetPathOverride
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 626
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
Description
I find two different units in Datastore for one source file after Indexing ends.
The two units are both imported from bazel generated indexstore because Xcode does not index the file 'ContentView.swift'
I think the reason may be that one indexstore is recorded two times with diffrent targetPathOverride in bi.filelist.
Reproduction steps
we can reproduce the behavior in examples/rules_ios.
- bazel run //:xcodeproj-incremental
- open rules_ios.xcodeproj
- wait for indexing finish
- check if there are two units for ContentView.swift in
Index.noindex/DataStore/v5/units
Expected behavior
one indexstore should not be imported with different targetPathOverride
rules_xcodeproj version
2.5.2
Xcode version
15.0
Bazel version
7.1.1
rules_apple version
No response
rules_swift version
No response
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue from examples/rules_ios with bazel run //:xcodeproj-incremental, then inspect the generated bi.filelist and Index.noindex/DataStore/v5/units after indexing. Trace how the same indexstore is recorded with different targetPathOverride values. Done means ContentView.swift has one imported unit rather than two.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100