-
-
Notifications
You must be signed in to change notification settings - Fork 537
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
Fix integration of SPM dependencies with resources #5945
Conversation
|
||
let gccPrefixHeader = "$(SRCROOT)/\(headerFile.path.relative(to: project.path).pathString)" | ||
var settings = modifiedTarget.settings?.base ?? SettingsDictionary() | ||
settings["GCC_PREFIX_HEADER"] = .string(gccPrefixHeader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution is not ideal as we're overriding this setting: #4902 (comment)
However, this setting is not really used by SPM targets (I couldn't find any that would and it's generally discouraged to use this setting unless for very special purpose) and we don't apply this for internal targets. If this becomes an issue, we can rethink this. I did try using the -include
C flag but that caused issues due to import of Foundation
and I haven't explored this further.
Resolves #3785
Short description 📝
Based on an original attempt at fixing this: #4902
This PR synthesizes the
SWIFTPM_MODULE_BUNDLE
for Objc external targets.We use the fork of NYTPhotoViewer not because the accessors are wrong, but they have two targets that point to the same directory, one using a symlink. We then generate two different modulemaps pointing technically to the same dir. I believe this is currently not worth solving unless we find more dependencies this imho awkward setup.
How to test the changes locally 🧐
You should be able to build
app_with_spm_dependencies
fixture.Contributor checklist ✅
mise run lint:fix
Reviewer checklist ✅
changelog:added
,changelog:fixed
, orchangelog:changed
, and the title is usable as a changelog entry