Indexing classes distributed over multiple files
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Hey,
I'm trying to index an entire Xcode project. Sadly the documentation for index is missing.
In one of the issues I've found it describes I'll have to pass more arguments such as:
sourcekitten index --file $(pwd)/MathClass.swift --compilerargs -- "-sdk $(xcrun --show-sdk-path --sdk macosx) -j4 $(pwd)/MathClass.swift"
But truthfully I have a few problems understanding what exactly these arguments mean :(
Having two classes in one file, I'll get a key.receiver_usr when calling a method from another class.
Splitting them into two and indexing them separately, I don't.
I guess I have to pass the dependencies to sourcekitten... but I don't really know how.
There is probably no option yet to parse an entire Xcode project, or is there?
Help would be greatly appreciated :)
P.S. In case I figure it out I'd love to help updating the documentation.
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 with the sourcekitten index command and the compilerargs example in the issue. Document what the arguments mean, how dependencies or multiple Swift files should be supplied, and whether indexing an entire Xcode project is supported. Done means a newcomer can follow the documentation to index classes distributed across files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100