SourceKitten
SourceKitten copied to clipboard
automatically determine compiler arguments for Objective-C projects
I decided to punt that in #57.
@jpsim I haven't looked at this in detail yet but maybe specifying an .xcconfig file might streamline this? I'm looking at using Jazzy with some Objective-C projects and was thinking of having a nicer way to invoke it.
The way we do this for Swift is to run xcodebuild and parse the result for compiler arguments. Since SourceKit requires all the files to have been indexed, and the best way I know of to do that is to build the whole module, this works out (although it's loooong).
For Objective-C, we don't need to index the files first, so we can just run xcodebuild -dry-run and parse the compiler arguments from the output.
When I used appledoc, I maintained an xml file (plist) with all the settings and pointed to it on the command line. Perhaps that would be an easy way to resolve this -- consult a plist which the user maintains for providing parameters to source kitten, etc.

jazzy can be configured via a YAML file, and I would prefer if SourceKitten automatically detected Objective-C compiler arguments like we do for Swift, rendering that kind of error-prone & tedious configuration unnecessary.
Automagic is always best. Wish swift wasn't such a moving target.
Sent from my iPhone
On Jan 8, 2016, at 1:33 PM, JP Simard [email protected] wrote:
jazzy can be configured via a YAML file, and I would prefer if SourceKitten automatically detected Objective-C compiler arguments like we do for Swift, rendering that kind of error-prone & tedious configuration unnecessary.
β Reply to this email directly or view it on GitHub.
Automagic is always best. Wish swift wasn't such a moving target.
This is actually for Objective-C. We already do this for Swift and it's been quite stable!
Excellent. Would you mind pointing me to a yaml file which is valid for a project (so I can understand how to populate one..)?
Sent from my iPhone
On Jan 8, 2016, at 1:53 PM, JP Simard [email protected] wrote:
Automagic is always best. Wish swift wasn't such a moving target.
This is actually for Objective-C. We already do this for Swift and it's been quite stable!
β Reply to this email directly or view it on GitHub.
See https://github.com/realm/jazzy#usage, https://github.com/bustoutsolutions/siesta/blob/master/.jazzy.yaml, https://github.com/danthorpe/Money/blob/development/.jazzy.yaml, https://github.com/natestedman/Shirley/blob/master/.jazzy.yaml, https://github.com/kaishin/gifu/blob/master/.jazzy.yaml, https://github.com/natestedman/Attributed/blob/master/.jazzy.yaml, https://github.com/DerLobi/Depressed/blob/develop/.jazzy.yaml
Awesome! ππΎπ―ππ’π¨ππ―ππ Thanks
Sent from my iPhone
On Jan 8, 2016, at 2:19 PM, JP Simard [email protected] wrote:
See https://github.com/realm/jazzy#usage, https://github.com/bustoutsolutions/siesta/blob/master/.jazzy.yaml, https://github.com/danthorpe/Money/blob/development/.jazzy.yaml, https://github.com/natestedman/Shirley/blob/master/.jazzy.yaml, https://github.com/kaishin/gifu/blob/master/.jazzy.yaml, https://github.com/natestedman/Attributed/blob/master/.jazzy.yaml, https://github.com/DerLobi/Depressed/blob/develop/.jazzy.yaml
β Reply to this email directly or view it on GitHub.
This interesting article might help you find a way to automate this (maybe?) π https://roman.dev/xcodebuild/