Add YGErrata Enum #1256

Closed
NickGerleman wants to merge 1 commits from export-D45254098 into main
NickGerleman commented 2023-04-24 18:18:56 -07:00 (Migrated from github.com)

Summary:
This adds a YGErrata bitset enum matching the API and guarantees described in https://github.com/facebook/yoga/issues/1247.

It is hooked up in later diffs. There are a couple of YGExperimentalFeature values that belong here, but keeping the current options means that the default YGErrataNone corresponds to existing default behavior, letting us stage the series of changes as:

  1. Implement errata API
  2. Update internal Yoga users we want to de-risk to YGErrataClassic or YGErrataAll (if setting UseLegacyStretchBehaviour)
  3. Add new errata, changing Yoga defaults to be conformant, while letting internal apps opt into compatibility modes pending experimentation.

I also added a macro to let C++ users of Yoga perform bitwise operations on the enum without casting (already available for C users).

Differential Revision: D45254098

Summary: This adds a `YGErrata` bitset enum matching the API and guarantees described in https://github.com/facebook/yoga/issues/1247. It is hooked up in later diffs. There are a couple of `YGExperimentalFeature` values that belong here, but keeping the current options means that the default `YGErrataNone` corresponds to existing default behavior, letting us stage the series of changes as: 1. Implement errata API 2. Update internal Yoga users we want to de-risk to `YGErrataClassic` or `YGErrataAll` (if setting `UseLegacyStretchBehaviour`) 3. Add new errata, changing Yoga defaults to be conformant, while letting internal apps opt into compatibility modes pending experimentation. I also added a macro to let C++ users of Yoga perform bitwise operations on the enum without casting (already available for C users). Differential Revision: D45254098
facebook-github-bot commented 2023-04-24 18:19:58 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 13:21:06 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 13:26:31 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 14:13:57 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 14:24:58 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 15:07:30 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 15:15:10 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 17:42:33 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 17:47:17 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 17:52:22 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 17:58:37 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 18:05:06 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 21:07:51 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 21:58:13 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 22:21:43 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-25 22:56:52 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 00:20:45 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 05:45:34 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:15:22 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:21:37 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:26:40 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:31:15 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:36:47 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:44:48 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:49:24 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 06:56:16 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 13:25:45 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 13:34:39 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 13:41:57 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 17:01:56 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 19:01:27 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 20:07:15 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 21:22:09 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 21:50:04 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 21:55:17 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 22:01:49 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 23:43:29 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 23:52:31 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-26 23:57:17 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-27 00:03:47 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-27 00:17:43 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-27 00:30:21 -07:00 (Migrated from github.com)

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

This pull request was **exported** from Phabricator. Differential Revision: [D45254098](https://www.internalfb.com/diff/D45254098)
facebook-github-bot commented 2023-04-27 03:19:24 -07:00 (Migrated from github.com)

This pull request has been merged in facebook/yoga@01c0c4ed3b.

This pull request has been merged in facebook/yoga@01c0c4ed3b2a1c1c661c0d696f75fcf10db72f81.

Pull request closed

Sign in to join this conversation.
No description provided.