-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(app): migrate app
module to a modular API
#6694
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Codecov Report
@@ Coverage Diff @@
## main #6694 +/- ##
============================================
- Coverage 54.04% 54.03% -0.01%
Complexity 690 690
============================================
Files 216 217 +1
Lines 10782 10790 +8
Branches 1698 1699 +1
============================================
+ Hits 5826 5829 +3
- Misses 4664 4668 +4
- Partials 292 293 +1 |
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.
Seems about right - and kind of exciting if it's really this small
@Ehesp what do you think about providing stubs for the APIs we have gaps on for platform reasons? (onLog, registerVersion) to close the JS -> RNFB API gap completely?
Yeah didn't knew what to do about those, but I can definitely add those 👍 |
I think it depends on the goal, and I'm not sure we have a defined goal there which is why I did an @ for Elliot. But maybe being explicit that they are not supported is better, and making it explicit by not implementing them, so people have to Platform is "safest" ? I personally don't think that's useful in practice but again I could be missing something. So my opinions are weakly held on stubbing the non-native APIs but I lean towards the idea stubbing them and eliminating all need for Platform checks would be cool |
The coverage bot is saying that some lines are not tested even thought the test was properly added. |
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 looks pretty good - I had a technical comment on failure assertions but that's trivial.
The only structural thought I have is:
- IF all the new stuff is "v9" and "modular",
- AND we assume that eventually v8 JS API goes away (I assert it will, new APIs are already v9-only
- THEN we will eventually deprecate and remove v8
- meaning that there will be a second big cleanup phase here to shift v9 to "default" and purge v8
I assert that we can avoid the second big cleanup phase (or make it trivial) if we build v8 obsolescence into these PRs.
What do I mean? I mean, what if instead of importing from v9 and exposing "modular", the first step of the PR was to move v8 implementation + tests to v8 sub-directories, and import it as "compat" (similar to the way you access the v8 APIs on the JS SDK now).
That could - I think - still just be internal structure, in our own exports (or re-exports) all the symbols would still be there so consumers would not have to think about it
But in the final state where the v8 / chained stuff likely goes away based assertion 2 above, we don't have a painful future cleaning phase, since we made v9 the default structurally as we were going through
Thoughts?
app
module to a modular API
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.
LGTM - I don't want to delay any longer sorry it sat this long!
Description
Related issues
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter