-
-
Notifications
You must be signed in to change notification settings - Fork 80
feat: add support for frameworks :static in RN 0.80 #865
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Warning Rate limit exceeded@jpudysz has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 53 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (5)
WalkthroughThe changes introduce dynamic detection of the React Native version in the podspec using a new Ruby helper, enabling conditional addition of iOS dependencies based on the detected version. The example project’s Xcode configuration is updated for framework usage, and dependencies in the example’s package.json are updated to stable React Native 0.80.0 versions. Changes
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Possibly related PRs
✨ Finishing Touches
🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Nitpick comments (4)
rn_version.rb (2)
3-6
: Avoid mutating the input argument; use a default value insteadRe-assigning
rn_path
when it isnil
mutates the caller-supplied reference.
Prefer a default parameter or a local variable to preserve intent and avoid side-effects.-def get_rn_version(rn_path) - rn_path = rn_path || '../node_modules/react-native' +def get_rn_version(rn_path = '../node_modules/react-native')
9-16
: Simplify path selection and drop the redundantelse
branch
if/elsif/else … nil
triggers RuboCop’s Style/EmptyElse.
A more idiomatic Ruby expression is:- rn_pkg_json = - if File.exist?(maybe_rn_pkg_json) - maybe_rn_pkg_json - elsif File.exist?(maybe_local_rn_pkg_json) - maybe_local_rn_pkg_json - else - nil - end + rn_pkg_json = [maybe_rn_pkg_json, maybe_local_rn_pkg_json].find { |p| File.exist?(p) }This removes the empty
else
, shortens the code, and makes the intent clearer.example/package.json (1)
12-13
: Version bump looks good – double-check Metro cache after upgradingNothing to fix in code, but remember to clear the Metro cache (
watchman watch-del-all && npm start -- --reset-cache
) when moving from0.80.0-rc.*
to the stable tag to avoid hard-to-trace bundle issues.Unistyles.podspec (1)
36-42
: Minor-only comparison may mis-detect future major releasesThe helper returns only the minor segment (
80
for0.80.0
).
If React Native ever releases1.0.0
,rn_version
would be0
, causing your ≥ 79 / ≥ 80 guards to fail. Consider comparing full semantic versions (e.g. withGem::Version
) or at least returningmajor * 100 + minor
.This aligns with the parsing fix suggested for
rn_version.rb
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
example/ios/Podfile.lock
is excluded by!**/*.lock
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (4)
Unistyles.podspec
(2 hunks)example/ios/example.xcodeproj/project.pbxproj
(6 hunks)example/package.json
(2 hunks)rn_version.rb
(1 hunks)
🧰 Additional context used
🪛 RuboCop (1.75.5)
rn_version.rb
[convention] 14-14: Redundant else
-clause.
(Style/EmptyElse)
[convention] 25-25: Redundant assignment before returning detected.
(Style/RedundantAssignment)
🔇 Additional comments (1)
example/ios/example.xcodeproj/project.pbxproj (1)
55-59
: EnsurePods_example.framework
is embedded correctly for App Store buildsThe new dynamic framework is added to Frameworks, but verify that the “[CP] Embed Pods Frameworks” phase actually embeds
Pods_example.framework
; otherwise TestFlight / App Store uploads may fail with missing framework errors.No code change required if the script list is auto-generated, but worth validating.
Summary
Fixes #860
Brings back support for static frameworks and React Native 0.78.
Summary by CodeRabbit