-
Notifications
You must be signed in to change notification settings - Fork 282
Converting ObjectiveGit to a Module #399
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
Conversation
Added success and error information to -[GTIndex clear:]
Removed libz from linked libraries to prevent a warning in Xcode 6 when compiling ObjectiveGit-ios (static libraries can't link to dynamic libraries).
|
Thanks for submitting this, and sorry for the delay in responding to it! I think we can get a lot of these build settings for free by updating the Would you mind trying that out? 🙇 |
|
It seems that the updated Also, the last three commits (adding the Let me know if I should do anything further. Thanks for the help! ✨ |
|
I'm not sure why the module map would be required, since I was able to turn other (admittedly less complex) frameworks into modules without doing that, but I have no idea what we'd have to do to omit it. Have you been testing with the Mac or iOS target? The Mac build seems to fail after these changes, though the iOS one compiled successfully for me. |
|
Hmm...that's really odd, since I've only been testing the Mac target. I also just tried a clean build, and that seemed to work successfully. What kind of errors are you seeing? |
|
First, there's a bizarre error compiling Specta: This seems more pertinent, though: |
|
Yeah, Specta has been acting really weird, so I just ended up just temporarily turning it off. The second set of errors seem to have something to do with the header import paths, but I'm not sure. Sometimes when I get similarly obscure errors, just cleaning and rebuilding the project seems to work for me. (This stuff is really undocumented. 😕 ) I'm heading off to the woods for a week, but I'll try out some more stuff when I get back. Thanks for all the help! |
|
Superseded by #386. |
|
Alright, sounds good. 👌 Thanks for your all your help! |
|
Actually, I'm not sure this was superseded. I've upgraded ObjectiveGit for Xcode 6, and changed it to a framework on iOS, but it's still not a proper module (because it doesn't include libgit2 within its umbrella properly). I'll reopen this. |
|
Cool. 👍 I'll try building it with all the new changes and see what sort of novel errors emerge from the depths of Xcode. |
|
Superseded by #424. |
|
Alright. Thanks for all your help, @jspahrsummers! |
Well, after a lot of wrangling with Xcode 6, it appears I have finally figured out how to generate ObjectiveGit as a module for use with Swift and Objective-C. 🎉 🎊
Note: 3rd party modules are a new feature in clang. Although beneficial but not necessary for Objective-C, they are required if a framework is to be imported into Swift.
To import the module into a new Xcode project, in addition to the changes made below, the following steps need to be taken each time:
External/ObjectiveGit), checkout the Swift branch, and runscript/bootstrap.ObjectiveGitFramework.xcodeprojinto the project navigator.External/ObjectiveGit(or wherever ObjectiveGit is located).ObjectiveGit.frameworkto that. (Due to the new module structure, you no longer need to set it as a target dependency or link it to your project.)External/ObjectiveGit, you would set this build setting toExternal/ObjectiveGit/External/libgit2/include. If you see build errors saying thatgit2/filter.hcannot be found, then double-check that you set this setting correctly.import ObjectiveGitin Swift or@import ObjectiveGit;in Objective-C.And you should be off and running!
Note: This is my first pull request to ObjectiveGit, so please suggest any dumb mistakes or changes to make it match the structure and style of the project. Thanks!