Summary:
D14600002 (74202aecff) added an XCode workspace for Yoga, but it hasn't been updated along with source changes, and is no longer functional.
For OSS build we should probably instead be relying on [YogaKitSample](https://github.com/facebook/yoga/tree/main/YogaKit/YogaKitSample), which is generated to consume Yoga via its podspec. This is also broken, but there are PRs open which fix this, and it refects real OSS usage of Yoga better.
Reviewed By: javache
Differential Revision: D40169978
fbshipit-source-id: 27c2b011721ba22f9453704c3ca857bf2459ba6a
Summary: These files are generated by Android Gradle Plugin doing the CMake build. Remove the generated files and add to the .gitignore (this looks to also be used by hg).
Reviewed By: javache
Differential Revision: D40169828
fbshipit-source-id: e0b7d907474aab5fcdb1a2ab33d46fdee6feed45
Summary:
cute-jumper suggested the layout preview move out of fbandroid4idea plugin because
1. Litho layout preview requires Yoga library and Yoga native library, which requires bundling. Bundling isn't supported by fbandroid4idea, and changing the plugin would be complicated.
2. We have more control in releasing our features for layout preview in a separate plugin as opposed to in fbandroid4idea.
As a result, this diff creates a new plugin for layout preview. Note that this diff creates only placeholder as moving the whole part might be too big for one diff
Reviewed By: cute-jumper
Differential Revision: D39974345
fbshipit-source-id: e3f579f700eafc9413562abed923da1ca3135fba
Summary: This change applies all Arcanist recommended lint changes, which amounts to changing copyright headers and some cases of whitespace changes.
Reviewed By: yungsters
Differential Revision: D40060899
fbshipit-source-id: b62f9472e6ef58a3fc3d22eed661578a2635cb1f
Summary: This replicates https://github.com/facebook/yoga/pull/760, to fix a typo around align-items. It does not have an effect on the tests themselves, since align-items defaults to stretch, and the test generator omits CSS properties of a default value.
Reviewed By: yungsters
Differential Revision: D40060324
fbshipit-source-id: da0565f2ad17e3e4e0f541a1c7006cdeeb991ece
Summary:
When building and using C # libraries,
EntryPointNotFoundException thrown from YGInteropSetLogger.
so, I added YOGA_EXPORT on YGInteropSetLogger.
Pull Request resolved: https://github.com/facebook/yoga/pull/960
Reviewed By: yungsters
Differential Revision: D40027238
Pulled By: yungsters
fbshipit-source-id: 6af584a16e66a31c91374a1bb64434888762e3c8
Summary:
Yoga is available as a port in VCPKG , documenting the install process here will help users get started by providing a single set of commands to build yoga, ready to be included in their projects.
VCPKG is a C++ library manager that simplifies installation for yoga and other project dependencies, we also test whether our library ports build in various configurations (dynamic, static) on various platforms (OSX, Linux, Windows: x86, x64, UWP, ARM) to keep a wide coverage for users.
I'm a maintainer for vcpkg, and here is what the port script looks like. We try to keep the library maintained as close as possible to the original library.
Pull Request resolved: https://github.com/facebook/yoga/pull/970
Reviewed By: yungsters
Differential Revision: D40027569
Pulled By: yungsters
fbshipit-source-id: ca9a6aa481c7b46e96c5937fe3cc7b716e464e4d
Summary:
When I use libyogacore.so in other programming languages, it crash with message as
> Could not obtain symbol from the library: dlsym(0x20b84d220, YGConfigIsExperimentalFeatureEnabled): symbol not found
This function is defined as `WIN_EXPORT bool YGConfigIsExperimentalFeatureEnabled` in yoga.h, but is not defined using `YOGA_EXPORT` in yoga.cpp.
Pull Request resolved: https://github.com/facebook/yoga/pull/1127
Reviewed By: yungsters
Differential Revision: D40024450
Pulled By: yungsters
fbshipit-source-id: f6f01eadccb13d593c68300059e96f4b0bbc9fb6
Summary:
correct sections' order in order to match header in alphabetical order
Pull Request resolved: https://github.com/facebook/yoga/pull/1118
Reviewed By: yungsters
Differential Revision: D40026297
Pulled By: yungsters
fbshipit-source-id: d28d41d69eb3a99fab9536cc79057c617cf0e2df
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1164
Yoga CI in GitHub is currently running using Node 8, released in 2017. It has long been out of support, and is not able to install many of the packages in the updated lockfile due to version restrictions in the new packages.
Node 12 is able to install the current lockfile. Although it is old enough that security support has ended for it 5 months ago, `yoga-layout` currently fails to install on Node 12+, because a dependency, `nbind`, was reliant on V8 internals that have changed between versions, and has not published a version supporting anything later than Node 10.
There are unpublished commits in the official repo which add Node 12 support. So, we use that version when developing against the website, to jump us to something more up to date, without rewriting or removing all of the JS bindings quite yet.
Reviewed By: yungsters
Differential Revision: D40036466
fbshipit-source-id: e1b775d87854250bd74fa17ca7ba939b32aa3bd8
Summary: Yoga playground within the website has a separate package.json from the website. Update that as well, which is responsible for 4 open dependabot PRs.
Reviewed By: yungsters
Differential Revision: D40026579
fbshipit-source-id: 2b82bdf2e90b8f433824f37b5e83750c338c9dfc
Summary:
Yoga has 35 open dependabot PRs targeting these two packages. This change generates fresh lockfiles for each version, which should close most of them I think.
For each lockfile:
1. Delete lockfile
2. Run `yarn --ignore-scripts`
Full-fat rebuilds of lockfiles are normally bit dangerous compared to more targeted dependency upgrades, but rebuilding the lockfile felt like a better option because of the duration since last update, number of pending updates, and the low risk due to neither package being installable on Node 12+ at the moment.
allow-large-files
Reviewed By: mdvacca
Differential Revision: D39987360
fbshipit-source-id: 86febac73b90b6c9f1fe2345325b59d14463d28b
Summary:
This adds the YGGutter enum, used to choose between row/column gap variants (row-gap, column-gap, gap).
This used later in changes from https://github.com/facebook/yoga/pull/1116, in the APIs which deal with setting gap on style on yoga node.
Note the original PR called this `YGGap`, but this ending up leading to a couple public method signatures that could appear ambiguous:
1. `SetGap(YGGap gap, float gapLength)`: Enums like `YGAlign` are the vaues for an `align` prop. `YGGap` controls the variant of the gap (like `YGEdge` does for left/right/top/bottom variants). So the enum reads as if it is the `gapValue`, and it looks like we have two of the same parameter.
2. `SetGap(YGGap gapDirection, float gap)`: This is misleading, because the direction gaps flow is the cross-axis of flex-direction.
3. `GetGap(YGGap gap)`: `gap` is the variant, but looks like an out param.
The [CSS Box Alignment](https://www.w3.org/TR/css-align-3/#column-row-gap) spec refers to these gaps as "Gutters", which removes the ambiguity.
Changelog:
[General][Added] - Add YGGutter Enum
Reviewed By: yungsters
Differential Revision: D39922412
fbshipit-source-id: 4b0baf800fecb3d03560a4267c7fb4c4330fd39e
Summary:
https://github.com/facebook/yoga/pull/1116 adds a new enum. The enum generator is out of date with copyright header, and some codemods, but it also looks like there were manual changes, types added, etc since generation. I fixed up the script to incorporate generating the changes folks made manually, and also added an enum that was previously only added manually to the C ABI.
Changelog:
[General][Fixed] - Fixup Yoga Enum Generator
Reviewed By: yungsters
Differential Revision: D39922252
fbshipit-source-id: b678fa9a43a896873d8c434745bdaf3f16fd991f
Summary:
https://github.com/facebook/yoga/pull/1116 added a change to the test generator "gentests.rb" to support a newer version of chromedriver, along with a change to the enum generator (not touched in this diff) to produce code consistent with the current tests, which seem to have been manually edited since last generation.
I had trouble running the test generator locally, because it relies on unversioned third-party dependencies, whose APIs change. Looking at source history, it seems like each time someone wants to run the script, they end up updating its syntax to match whatever versions they pull in.
This change adds a Gemfile and lock so that that the version of "watir" is locked, and so that we will also automatically pull in a consistent "chomedriver" version via the "webdrivers" gem. It includes the updates from the PR to be consistent with already output tests, and I have also updated the copyright header generation to no longer create lint warnings on newly generated tests (some of the previous ones were fixed manually it looks like).
The test generator would still produce bodies which would fail clang-format, and were manually edited (causing generation to emit new lint warnings), so I updated the generator to suppress clang-format in the body of the generated files.
Three tests, around the interaction of minimum dimensions and flexible children produce different results in Chrome now compared to when the tests were added, so running `gentests.rb` creates tests which break UTs. This doesn't seem like any sort of rounding, or device specific difference, so I have disabled these tests for now. While digging around, it does look like Chrome periodically will fix bugs in its own layout implementation which cause differences, like https://bugs.chromium.org/p/chromium/issues/detail?id=927066
Reviewed By: rozele, Andrey-Mishanin
Differential Revision: D39907416
fbshipit-source-id: f88714ff038b42f935901783452df25eabb6ebb1
Summary: move testTranscoder and TestUploader functions to TargetedTesting so that they can run batch testing for those as well, add listener for upload media composition
Differential Revision: D39299097
fbshipit-source-id: ed40a876875fdc6a0d1db8f283082da8d8dc20f7
Summary:
`JNIEnv`'s `FindClass(..)` function takes the classes in the standard
`foo/bar/Baz` class specification (unless they're special, like arrays).
Specifying them with `Lfoo/bar/Baz;` results in a
`ClassNotFoundException` being raised -- which is especially unhelpful
when intending to re-throw an exception.
The docs for `JNIEnv#FindClass(..)` can be found [here][jnienv].
[jnienv]:
https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/functions.html#:~:text=The%20name%20argument,java/lang/String%22
## Changelog
[Android] [Fixed] - Correctly resolve classes with FindClass(..)
X-link: https://github.com/facebook/react-native/pull/34533
Reviewed By: amir-shalem
Differential Revision: D39133326
Pulled By: jacdebug
fbshipit-source-id: 86283b7d21aed49ed0e9027b2aef85f0108cdf9a
Summary:
This change is mostly needed to support the new react-native architecture with Swift. Some private yoga headers end up being included in the swift build and result in compilation failure since swift cannot compile c++ modules. See https://github.com/facebook/react-native/pull/33381.
The most reliable fix is to include all headers as public headers, and add `#ifdef __cplusplus` to those that include c++. This is already what we do for other headers, this applies this to all headers.
Tested in the YogaKitSample, and also in a react-native app.
Changelog:
[iOS] [Changed] - Make all Yoga headers public and add #ifdef __cplusplus
Pull Request resolved: https://github.com/facebook/yoga/pull/1150
Reviewed By: dmitryrykun
Differential Revision: D36966687
Pulled By: cortinico
fbshipit-source-id: a34a54d56df43ab4934715070bab8e790b9abd39
Summary: This results in compiler warnings. At the scale of our builds, warnings are useless; no one feels empowered to fix thousands of noisy warnings, so they are just noise. Turn them off.
Reviewed By: Daij-Djan, nlutsenko
Differential Revision: D35579825
fbshipit-source-id: cffb7b4ae94299b78aec057e43e87e756efd2d63
Summary:
I guess it's the same since we're working on a `bool` but... this causes some compilation error.
Changelog:
[General][iOS] - Fix compilation warning in yoga
Reviewed By: Andrey-Mishanin
Differential Revision: D35438992
fbshipit-source-id: 22bb848dfee435ede66af0a740605d4618585e18
Summary:
Our mission at Meta Open Source is to empower communities through open source, and we believe that it means building a welcoming and safe environment for all. As a part of this work, we are adding this banner in support for Ukraine during this crisis.
Pull Request resolved: https://github.com/facebook/yoga/pull/1134
Reviewed By: cortinico
Differential Revision: D34635677
Pulled By: dmitryvinn-fb
fbshipit-source-id: 492fb66b9d4cb218f422564dcef24089c2847603
Summary: Same as title and added aliasing
Reviewed By: aniketmathur
Differential Revision: D34216617
fbshipit-source-id: 99de98d2c8264a02a8d6f7ff065adff924dd8060
Summary: There are two `yoga_defs.bzl` files... both need to be updated to suppress warnings
Differential Revision: D33393056
fbshipit-source-id: 752416af5386fc0d519689b554d2d6629d186d88
Summary: Yoga (open source) has errors when `-Wconversion` is enabled. Suppress those to be just warnings.
Differential Revision: D33330019
fbshipit-source-id: f5fad5581985942d469cb0689e706403d869323b
Summary:
This diff disables submodules for dependencies of IG that are not `ig_apple_library` and are exporting non-modular dependencies. This will allow for migration to using submodules as a default.
The list of targets was obtained with:
```
% buck query 'kind(apple_library, attrfilter(labels, skip_module_validation, deps(igios)) - attrfilter(labels, ig_apple_library, deps(igios)))'
```
Reviewed By: ebgraham
Differential Revision: D32399636
fbshipit-source-id: f3ba55def8001e8595fe3b1611d2de8ec38c8622