doc command produces duplicate entries when run on projects in /var
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
I originally posted this as an issue against the jazzy doc generator for Xcode projects:
https://github.com/realm/jazzy/issues/755
But after a bit more investigation the root issue appears to be in sourcekitten.
To reproduce:
- Create a simple Xcode project in your home directory with at least one Swift class with documentation comments (can be as little as three slashes above the declaration of an empty class)
- Run
sourcekitten docin the root of the project and save the output - Copy the whole project contents to a folder inside
/var - Run
sourcekitten docin the root of the copied project and save the output
Comparing the outputs, you will notice that the output from the project in /var/... has duplicate entries for the same declaration. This causes jazzy to get confused.
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 sourcekitten doc on identical Swift/Xcode projects in a home directory and under /var, then compare the generated outputs. Trace the doc command's handling of declarations and paths; done means the project under /var produces no duplicate entries and no longer confuses jazzy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100