Skip to content
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

[IOS] Remove redundant fmt dependencies #44449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Saadnajmi
Copy link
Contributor

@Saadnajmi Saadnajmi commented May 7, 2024

Summary:

fmt is required by many different podspecs, but is only used by Folly. I verified this by removing fat altogether and seeing what build errors I got. Cocoapods supports transitive dependencies, so let's simplify the build graph a bit and mark fmt as only a dependency of folly.

Changelog:

[IOS] [CHANGED] - Remove redundant fmt dependencies

Test Plan:

CI should pass. Local build of RNTester works.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Microsoft Partner: Microsoft Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels May 7, 2024
@analysis-bot
Copy link

analysis-bot commented May 7, 2024

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,495,291 +37
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,867,570 +23
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: be09d12
Branch: main

@NickGerleman
Copy link
Contributor

DoubleConversion is in this same boat, if we are able to make exported headers work nicely everywhere.

@Saadnajmi
Copy link
Contributor Author

DoubleConversion is in this same boat, if we are able to make exported headers work nicely everywhere.

I can take a look. I was looking at cleaning up the header search paths too

@Saadnajmi
Copy link
Contributor Author

@NickGerleman It looks I can remove the header search paths for fmt, and the dependency/header search paths for DoubleConversion too. One thing I'm not clear about is that I think codegen (which generates ReactCodegen.podspec.json) needs both, so I've left fat and DoubleConversion a dependency there. I'm not sure if it's fine for codegen to get the dependency through folly, or if it generates code that uses either library.

@Saadnajmi
Copy link
Contributor Author

Saadnajmi commented May 8, 2024

@NickGerleman I did some testing. Removing the fmt header search paths breaks dynamic frameworks support, since I guess most things depend on folly eventually. Removing the DoubleConversion dependency seems to be in the same boat. So I think the change in its current form is what works.

@Saadnajmi Saadnajmi changed the title [IOS] Make fmt only a dependency of folly [IOS] Remove redundant fmt dependencies May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Microsoft Partner: Microsoft Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants