-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Breaking: size_t indices #1366
Breaking: size_t indices #1366
Conversation
This pull request was exported from Phabricator. Differential Revision: D49130914 |
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: 202ed16597b34a804d771b161a6e2319f10dd4c3
2308b48
to
f930795
Compare
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: 24cc3f70bf7e3662f02adb5abac90d19a34c6344
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: e55ba3f0b59b8b00433da9d7ab898147c8cbcd0f
f930795
to
16506de
Compare
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: 2a875a2c063ac8595e787fa0fe4f053bc50a4e74
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: 340555195d4b3d1f7179be99e7d6b49f3d22ec0b
16506de
to
3681645
Compare
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: dcd1f2b6cf4a66c5b518cbe5be0bd9d7833729ca
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: fb477f98443055ee5523521f562e37caffc25ba0
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Differential Revision: D49130914 fbshipit-source-id: 6d929cf3757dc1cb08dba788cfbe05f4d0310980
3681645
to
648c88b
Compare
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 6b9de766af3a9ccdc8772f60a1671c31d934ae91
648c88b
to
9e23366
Compare
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 2c5cc30b8570b2df3a84091748d3144ff63a707e
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 6a9ad2385c8022c313e54fe8aaa5547bf76c9d49
9e23366
to
8551d99
Compare
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 2dfd505a3f2bdd17b15cc46dc732fb55fc2d63e3
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: bfaff0ed8c65e6d0b0bc9dffc18f10c177220529
8551d99
to
138d9c7
Compare
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 6fd72245cd8de59159a254dd98690c9dc2d81af0
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 766d3ae999327169f89157fb6c5b484eb14d1aa6
This pull request was exported from Phabricator. Differential Revision: D49130914 |
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: e3112b50a5a3202c6ecf256ce19508acad451c6d
138d9c7
to
bdc781d
Compare
Summary: This changes public Yoga API to in more places accept const structures where before they required mutable ones. This tries to avoid more breaking changes yet, e.g. changing callbacks to require clients do not modify nodes when they are passed for logging. We also don't have const variants for returning child structures which would allow mutation of dependencies of the const object. These would need new names under the public API, since we do not have operator overloading in C. Differential Revision: D49130412 fbshipit-source-id: b14f2b09652e53c04056249a220ee607d0f1bf20
Summary: Pull Request resolved: facebook#1369 X-link: facebook/react-native#39370 This fixes const-correctness of callbacks (e.g. not letting a logger function modify nodes during layout). This helps us to continue to fix const-correctness issues inside of Yoga. This change is breaking to the public API, since it requires a change in signature passed to Yoga. Changelog: [Internal] Differential Revision: https://internalfb.com/D49130714 fbshipit-source-id: 07e396e6c4f5688a1494210bbd7da9159870eeb9
Summary: Pull Request resolved: facebook#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 55dd5310895f1764da42f1b870fad41b491b55d1
This pull request was exported from Phabricator. Differential Revision: D49130914 |
bdc781d
to
3a87e51
Compare
Summary: X-link: facebook/yoga#1366 Pull Request resolved: facebook#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 5065cd77955bf475ea4ce1d401637ebe19778d30
Summary: X-link: facebook/yoga#1366 X-link: facebook/react-native#39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 6a004c160c4c50f68047b108508fd437156f5fac
Summary: X-link: facebook/yoga#1366 Pull Request resolved: #39371 Yoga's public API exposes indices most often as `uint32_t`, with exception of clone callbacks which are `int32_t`. Yoga internally represents these indices as `size_t` when dealing with the child vector, and this is the true index. This changes the API to consistently be `size_t`. This should not be breaking for most users, but will cause breaks where: 1. Users set a clone node callback (I think this should be rare. RN uses it, but only because it relies on a separate private API). 2. Callers of `YGNodeGetChildCount()` are assigning to an int with less width than `size_t` and have strong warnings enabled. 3. Using a newer Yoga binary with older source, since we are not preserving ABI compatibility (Yoga in general does not aim to be ABI stable between major versions, only ABI safe for a given set of sources). Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D49130914 fbshipit-source-id: 6a004c160c4c50f68047b108508fd437156f5fac
This pull request has been merged in 776065d. |
Summary:
Yoga's public API exposes indices most often as
uint32_t
, with exception of clone callbacks which areint32_t
. Yoga internally represents these indices assize_t
when dealing with the child vector, and this is the true index.This changes the API to consistently be
size_t
. This should not be breaking for most users, but will cause breaks where:YGNodeGetChildCount()
are assigning to an int with less width thansize_t
and have strong warnings enabled.Changelog: [Internal]
Differential Revision: D49130914