-
Notifications
You must be signed in to change notification settings - Fork 54
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
🐛 Use product name instead of module name when patching XCFrameworks #266
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #266 +/- ##
==========================================
+ Coverage 26.59% 26.61% +0.01%
==========================================
Files 164 164
Lines 4756 4757 +1
==========================================
+ Hits 1265 1266 +1
Misses 3491 3491
☔ View full report in Codecov by Sentry. |
c96d50a
to
a8c83d9
Compare
cc87179
to
743bfad
Compare
…rameworks When patching support files, we should use just product.name to replace XCFrameworks paths. This is because module name is used for importing modules in swift, which doesn't allow special characters like '-'; however for header search path and library search path, special characters are allowed. Therefore when we have targets whose name has characters not supported in Swift, such as "foo-bar", using product.moduleName makes the regex pattern "${PODS_XCFRAMEWORKS_BUILD_DIR}/foo_bar", which causes search path "${PODS_XCFRAMEWORKS_BUILD_DIR}/foo-bar" cannot be substituted because regex pattern doesn't match.
743bfad
to
8eaf730
Compare
@swiftyfinch Ah sorry, wasn't checking GitHub notifications on weekends... I fixed them and now it should be OK. |
@PRESIDENT810 Thank you for your contribution! 🚀 |
Description
When patching support files, we should use just product.name to replace XCFrameworks paths. This is because module name is used for importing modules in swift, which doesn't allow special characters like '-', so for modulemap search path we should use module name; however for header search path and library search path, special characters are allowed. Therefore when we have targets whose name has characters not supported in Swift, such as "foo-bar", using product.moduleName makes the regex pattern for patching XCFrameworks be
"${PODS_XCFRAMEWORKS_BUILD_DIR}/foo_bar"
, which causes search path"${PODS_XCFRAMEWORKS_BUILD_DIR}/foo-bar"
cannot be substituted because regex pattern doesn't match.For example:
For patching modulemap path, we should use
product.moduleName
which doesn't include special characters like '-', but for patching XCFramework, we should useproduct.name
Checklist (I have ...)
make lint
and fixed all warningsmake test
and fixed all tests❤️ Thanks for contributing to the 🏈 Rugby!