jazzy: Cannot find ObjC headers from subfolders
I’m having issues with jazzy finding source files.
- In my objC project I’m using subfolders to organize files.
- I have an umbrella header containing imports:
- when importing a file via
#import "<Filename>.h"
- compiler builds
- jazzy cannot find the filename (
fatal error: '<Filename>.h' file not found
)
- when importing a file via
#import <Subfolder/Filename.h>
- compiler doesn’t build
- jazzy finds the file but cannot find the imports included in that header file (maybe bc. they also are in another subfolder of the project)
- when importing a file via
Any ideas how to fix that issue? I’d also be interested in an example - would greatly appreciate if anybody could provide a link to a repo using objC that organizes files in subfolders and got jazzy working.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (3 by maintainers)
Commits related to this issue
- enable header files from subdirectories Adding all subdirectories of specified "framework_root" option as argument to sourcekitten. This enables references inside the umbrella header to other source ... — committed to ainopara/jazzy by gretzki 8 years ago
- enable header files from subdirectories Adding all subdirectories of specified "framework_root" option as argument to sourcekitten. This enables references inside the umbrella header to other source ... — committed to realm/jazzy by gretzki 8 years ago
- enable header files from subdirectories Adding all subdirectories of specified "framework_root" option as argument to sourcekitten. This enables references inside the umbrella header to other source ... — committed to zsstrehli/jazzy by gretzki 8 years ago
It looks like the JazzyObjCSubfolders project’s
.jazzy.yaml
file should have hadObjectiveCJazzy
forframework_root
instead ofBRTObjectiveCJazzy
(in addition to the other compatibility fixes i had to make:objc_mode:
toobjc:
andversion:
tomodule_version:
).With this correct directory name, my experiment calling
sourcekitten
with it and the added subdirectories arguments succeeded.A change to jazzy’s
sourcekitten.rb
to add those additional-I
arguments for each subdirectory offramework_root
seems to work for both JazzyObjCSubfolders and my own project:I don’t know if this should always be done or controlled by a command line/config file option though. Also, there could be a better way to find subdirectories instead of visiting every file. I’ll leave it to someone else to figure those out & make this fix for real.