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.
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
Move
use_flipper
logic insideuse_react_native
and simplify the Flipper dependencies logic #33882Move
use_flipper
logic insideuse_react_native
and simplify the Flipper dependencies logic #33882Changes from 9 commits
c05cb76
c3d8783
fdd92c8
387d626
0bc843f
7be8a3e
3e9545f
543f1d8
b2d71d5
b3a0bc6
dc8ad2e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Nit: In Ruby, the last statement is always returned so we can drop
return
here to be more idiomatic: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 is a temporary workaround that should fix #33764
If production is true the flipper pods are not added at all (differently than what CocoaPods does that compiles them, but then doesn't copy the frameworks), this avoids Flipper to be compiled when releasing, hence avoids the error discussed in the issue.
The downside of this workaround is that before making a release, the user needs to call
pod install
againThere 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.
Correct me if I'm wrong, but it used to have to call it anyway, passing
production = false
, right?I would also specify, perhaps also adding some doc, that it's still the case. When a user wants to build for release, it has to run
PRODUCTION=1 pod install
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.
That is correct, however if there wasn't the mentioned issue we could only rely on CocoaPods' configurations logic to do esclude Flipper from production (it would anyway compile flipper but wouldn't copy it) and remove the production flag.
The
PRODUCTION=1 pod install
is how this is set up on RNTester, final users could potentially set their own way to define if is production or not depending on their needs and their workflow.If we think setting the
PRODUCTION
env variable is a good default to express that we want the production flag true I can add that to the template as well.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.
Can you add a comment about that here? I think this can be easily missed since it's such a weird quirk of CocoaPods.
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.
Yes, sorry I missed this comment, will make another PR to fix those two comments as well
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.
Opened #33902
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.
Just a small heads up: shouldn't we deprecate
use_flipper()
now?What happens to a user that is doing?
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.
The idea is that it won't work, the function
use_flipper
won't exist anymore after this change.The only thing is probably how tell the user that the flipper configuration is now into the
use_react_native
function.In case we wanted to do so we could use something like
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.
Yup that makes total sense 👍