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

Replace usages of YGConfigSetUseLegacyStretchBehaviour #37093

Closed
wants to merge 3 commits into from

Conversation

NickGerleman
Copy link
Contributor

Summary:
This replaces product usages of YGConfigSetUseLegacyStretchBehaviour with instead setting YGErrataAll, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying YGErrataClassic, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Differential Revision: D45300631

@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: Facebook Partner: Facebook Partner fb-exported labels Apr 26, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

@analysis-bot
Copy link

analysis-bot commented Apr 26, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,499,710 +239
android hermes armeabi-v7a 7,833,554 +219
android hermes x86 8,977,657 +238
android hermes x86_64 8,834,477 +229
android jsc arm64-v8a 9,064,270 +339
android jsc armeabi-v7a 8,275,566 +318
android jsc x86 9,113,565 +341
android jsc x86_64 9,374,032 +334

Base commit: b3478cb
Branch: main

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 50ae18fe20a30c3d607caba15b080cafad0ecc46
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 6828d6bf537591e1811d85122f162f9497771c4d
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: f6289229414b7e10f42918cb557a421a82b3c02d
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: a410ae9b22b463755e6d454f7fee80abd8b91f5e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 9178f9e175b6abeec7770cca0371230ce8f07b49
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 054be9d2cf52a9848ccbaf0e325519c77600e844
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 401ad047ad2a8466acb0f799844f7f32d033ffc0
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 6c2ec36336764e5e7fe3cce55f1d32953afdac92
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: cff1981e63460ac7149c67d2a4d93e412393eea1
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 43e6504a311bd14a90691635524e50f787b19f9b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 7dec964c9e09c9ebcb59c5971af2fb8a139fe836
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 77069bfdbd3a2c516be920aaae5a45a5b063ea08
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 4640f033b52f14db3f26dc682799a4c2c3235132
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: dbe8c82b3de677b9788878dc2b4fa2aaccabe156
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

NickGerleman and others added 3 commits April 27, 2023 12:29
Summary:
This searches fbsource for the following strings corresponding to node or config creation using Yoga Java bindings.
1. `YogaNodeFactory.create`
2. `YogaConfigFactory.create`

Apart from benchmarks/tests, thie leaves RN Paper, Litho and Native Templates. These are opted into compatibility with current Yoga behavior, using either `YogaErrata.CLASSIC`, or `YogaErrata.ALL` where `UseLegacyStretchBehaviour` is currently set.

Differential Revision: https://internalfb.com/D45299721

fbshipit-source-id: 1814cb375ab0a51e9b0bbb58bd35aac4ce8e33c6
Summary: Now that our own usages are removed, mark this as deprecated to encourage users to move to the errata API. The same will be done to variants of this function on other platforms before releasing, and the functions will be removed after releasing.

Differential Revision: D45300343

fbshipit-source-id: 11980ef895bc2bc8073fa6c10df4ccd11eb71c91
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 97b5f4a70f77a590d77248f2a9d2b8fa6633004e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45300631

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 27, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b0cf746.

jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 9f94bdbbe7eda091adac016231083b2486c583d9
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
Pull Request resolved: facebook#37093

This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility.

We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning).

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D45300631

fbshipit-source-id: 9f94bdbbe7eda091adac016231083b2486c583d9
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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants