MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj
Bug: Incorrect error on swift imports "module xxx not found"
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 626
- Forks
- 124
- PR merge metrics
- No merged PRs in 30d
Description
Description
In Xcode editor, opening a swift source file shows a red error on import lines complaining "module XXX is not found"
This is not a true error in that the build would succeed regardlessly.
Reproduction steps
- Have a
swift_libraryA which depends onswift_libraryB. - Generate Xcode project and open swift source file in A which has line
import B - Xcode will mark the line
import Bwith message"module A not found"
Expected behavior
Xcode doesn't mark the line import B with message "module A not found"
rules_xcodeproj version
1.6.0
Xcode version
14.1
Bazel version
6.1
rules_apple version
No response
rules_swift version
No response
Additional information
This is expected to resolve once the Xcode's Index build for target B is completed, however, more intuitive experience would be if source file in A is open, then the Index build for target B is scheduled with high priority.
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
Start by reproducing the issue with the stated Swift libraries, Bazel 6.1, rules_xcodeproj 1.6.0, and Xcode 14.1. Trace Xcode project generation and the Index build scheduling for the dependent target B. Done means opening A no longer shows a false missing-module error for import B while the build still succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100