Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatically determine compiler arguments for Objective-C projects #88

Open
jpsim opened this issue Nov 7, 2015 · 10 comments
Open

automatically determine compiler arguments for Objective-C projects #88

jpsim opened this issue Nov 7, 2015 · 10 comments

Comments

@jpsim
Copy link
Owner

jpsim commented Nov 7, 2015

I decided to punt that in #57.

@jpsim jpsim mentioned this issue Nov 7, 2015
8 tasks
@seanlabastille
Copy link

@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.

@jpsim
Copy link
Owner Author

jpsim commented Nov 11, 2015

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.

@Mozahler
Copy link

Mozahler commented Jan 8, 2016

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.
appledocsettings

@jpsim
Copy link
Owner Author

jpsim commented Jan 8, 2016

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.

@Mozahler
Copy link

Mozahler commented Jan 8, 2016

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 notifications@github.com 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.

@jpsim
Copy link
Owner Author

jpsim commented Jan 8, 2016

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!

@Mozahler
Copy link

Mozahler commented Jan 8, 2016

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 notifications@github.com 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.

@rogerluan
Copy link

This interesting article might help you find a way to automate this (maybe?) 🍀 https://roman.dev/xcodebuild/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants