[Question] "key.swift_declaration" present for protocol methods, but not class methods?
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
sourcekitten doc --objc test.h -- -x objective-c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -I $(pwd)
test.h:
#import </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableView.h>
// If using just #import <UIKit/UITableView.h>, the output is empty
The output has swift_declaration returned for protocol methods (ex. c:objc(pl)UITableViewDataSource(im)tableView:numberOfRowsInSection:), but no swift_declaration returned for class methods (ex. c:objc(cs)UITableView(im)scrollToNearestSelectedRowAtScrollPosition:animated:).
Any hints how to get swift_declaration returned for class methods?
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 rerunning the sourcekitten doc --objc command against the supplied test.h and UIKit SDK paths. Compare the swift_declaration output for the UITableViewDataSource protocol method and UITableView class method, then inspect the command's handling of those symbols. Done means establishing whether class methods should return this field and documenting or correcting the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, swift
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100