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

git2 framework+module #1

Closed
wants to merge 13 commits into from
Closed

git2 framework+module #1

wants to merge 13 commits into from

Conversation

phatblat
Copy link
Owner

This is an experiment to see if creating a true module resolves the following issues:

  • 🚫 Include of non-modular header inside framework module 'ObjectiveGit'
  • ⚠️ Umbrella header for module 'ObjectiveGit' does not include header '/git2/cred_helpers.h'

While it is possible to turn the libgit2 static library into a module, the result is an extra file that must be placed correctly alongside the header files. Wrapping all these up in a framework simplifies things for client projects.

@phatblat
Copy link
Owner Author

Projects trying to use ObjectiveGit without enabling CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES see errors like this:

screen shot 2015-07-24 at 11 45 40 pm

What's odd about this setting is that once you have a clean build after it is enabled, these errors will not come back until you:

  1. Clean the project
  2. Delete DerivedData/ModuleCache
  3. Restart Xcode

@phatblat
Copy link
Owner Author

The umbrella header warnings look like this:

screen shot 2015-07-26 at 7 34 19 pm

These are mostly just annoying, but could cause problems if the referenced headers are needed by a client. It's basically saying "this header is part of the module, but not included in the umbrella header".

@phatblat phatblat self-assigned this Jul 27, 2015
@phatblat
Copy link
Owner Author

I suspect the "non-modular header errors" were only showing up in Swift apps because Swift must use modules to import symbols, whereas Objective-C #import uses the old mechanism (see libgit2#436). I never tested it, but I suspect Objective-C apps using @import ObjectiveGit; would have these module errors as well,

@phatblat
Copy link
Owner Author

phatblat commented Apr 9, 2016

This work has been moved to libgit2#570

@phatblat phatblat closed this Apr 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant