fix(🍏): include cpp/api, cpp/skia, cpp/jsi, cpp/rnskia, cpp/utils in HEADER_SEARCH_PATHS#3849
Closed
mini-777 wants to merge 1 commit into
Closed
Conversation
…HEADER_SEARCH_PATHS Under `use_frameworks! :linkage => :static` (or Expo's `useFrameworks: 'static'`), the recursive `"$(PODS_TARGET_SRCROOT)/cpp/"/**` glob does not propagate to sibling directories, so compilation of `cpp/api/third_party/base64.cpp` fails with `'third_party/base64.h' file not found` (and similar misses for headers under `cpp/skia`, `cpp/jsi`, `cpp/rnskia`, `cpp/utils`). Add those five paths explicitly alongside the existing rnwgpu/dawn entries so static-frameworks builds resolve them. Fixes Shopify#3839.
9a8ebcb to
4f448c6
Compare
Contributor
|
Thank you for the PR. This is great. Currently updating the Expo e2e test to outline the issue, then fixing the bogus path imports. Will keep you posted asap. |
Contributor
|
#3853 is super-seeding this PR, I'm publishing now let me know if it fixes the issue. Thank You for this 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Under
use_frameworks! :linkage => :static(or Expo'suseFrameworks: 'static'), the recursive"$(PODS_TARGET_SRCROOT)/cpp/"/**glob in the podspec does not propagate to sibling directories undercpp/, so compilation fails with errors like:The header exists at
cpp/api/third_party/base64.h, butcpp/apiis not on the explicitHEADER_SEARCH_PATHSlist — and likewise for sibling sources that reference headers undercpp/skia,cpp/jsi,cpp/rnskia, andcpp/utils.Fix
Add the five missing directories explicitly alongside the existing
rnwgpu/dawnentries:The relative ordering of the rnwgpu/dawn entries is preserved; only the five sibling roots are inserted.
Verification
useFrameworks: 'static'+ Skia 2.6.2 via both localpod install && xcodebuildand EAS Build. Without the patch, source-built Skia fails as above. With the patch (applied viapatch-packagein the consuming app), the iOS app compiles and links cleanly.Affected versions
The same incomplete line exists on
mainand back through at least 2.4.18, so this PR targetsmainand benefits every consumer using static frameworks.Related
SkData.hreport (SkData.h not found when using use_frameworks! #652)