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 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
Summary:
Add a label to modular libraries that are exporting non-modular deps. This will allow the upcoming tests to skip these targets for now.
#nocancel #retry_on_user_failure #notimeout #retry_on_timeout
Reviewed By: ebgraham
Differential Revision: D31320728
fbshipit-source-id: b1776d71168c282ff791030e530669a2341a9ac8
Summary:
This diff solves `pod lib lint` failure.
We want to make a new yoga release, as I landed some changes in its podspec which solves the broken flipper build for xcode 11.
{F221612119}
Reviewed By: passy
Differential Revision: D18382588
fbshipit-source-id: efddfa3e93ca59b79b887d04f83407b004d9a199
Summary:
The test was broken and caused a few crashes on my project.
Pull Request resolved: https://github.com/facebook/yoga/pull/915
Differential Revision: D16701613
Pulled By: davidaurelio
fbshipit-source-id: 9ab5c43bb74e77593bc2426a249750a7ee8f4034
Summary:
`/*` is the standard throughout open source code. For example, Firefox uses single /*: https://hg.mozilla.org/mozilla-central/file/21d22b2f541258d3d1cf96c7ba5ad73e96e616b5/gfx/ipc/CompositorWidgetVsyncObserver.cpp#l3
In addition, Rust considers `/**` to be a doc comment (similar to Javadoc) and having such a comment at the beginning of the file causes `rustc` to barf.
Note that some JavaScript tooling requires `/**`. This is OK since JavaScript files were not covered by the linter in the first place, but it would be good to have that tooling fixed too.
Reviewed By: zertosh
Differential Revision: D15640366
fbshipit-source-id: b4ed4599071516364d6109720750d6a43304c089
Summary:
@public
Xcode does not like it
Reviewed By: astreet
Differential Revision: D14580168
fbshipit-source-id: 6d26b3961b45a59ef9dc977b21493e60e3cf9396
Summary: Turns out Xcode does not like document-level comments.
Reviewed By: SidharthGuglani
Differential Revision: D14301138
fbshipit-source-id: f515a1881daa109031963688c1556cb8ef42758f
Summary:
@public
`YGNodeRemoveAllChildren` can be used instead of removing children of a yoga node in a loop.
Reviewed By: zats
Differential Revision: D14131679
fbshipit-source-id: 6ee31f1e288b9b161c641b5bca4f2c1156d58c38
Summary:
@public
Stricter encapsulation of baseline and measure callbacks withing `YGNode`.
Instead of invoking these callbacks directly (`node->getBaseline()(...)`), they are invoked via methods on `YGNode` (`node->baseline(...)`).
This change will allow us to add the concept of a *Layout Context,* where measure and baseline functions will be able to receive an additional `void *` argument if configured accordingly. This API will be used internally for Yoga’s JNI bindings, to avoid storing a weak JNI reference for each node, and avoid reference table overflows.
Changed API:
- `YGNodeGetMeasureFunc()` -> `YGNodeHasMeasureFunc()`
- `YGNodeGetBaselineFunc()` -> `YGNodeHasBaselineFunc()`
- `YGNode::getMeasure()` -> `YGNode::hasMeasureFunc()` + `YGNode::measure()`
- `YGNpde::getBaseline()` -> `YGNode::hasBaselineFunc()` + `YGNode::baseline()`
Reviewed By: SidharthGuglani
Differential Revision: D14099550
fbshipit-source-id: 2653ab36acc252a9747986bc88d21dac22d8c91b
Summary:
Fixes#606.
If there are no subviews in `UIView`, yoga assumes that `sizeThatFits:` returns `CGSizeZero`. However, according to [the documentation](https://developer.apple.com/documentation/uikit/uiview/1622625-sizethatfits), `UIView` returns current size if there are no subviews.
This diff adds a check - if there are no subviews, `sizeThatFits:` doesn't get called, and CGSizeZero is returned.
Pull Request resolved: https://github.com/facebook/yoga/pull/610
Reviewed By: davidaurelio
Differential Revision: D6807406
Pulled By: priteshrnandgaonkar
fbshipit-source-id: 9189cf14c393f840122bc365d3827881bf03548c
Summary: This change drops the year from the copyright headers and the LICENSE file.
Reviewed By: yungsters
Differential Revision: D9727774
fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
Summary: `-init` is marked unavailable, but `+new` does the same thing and is not.
Reviewed By: dshahidehpour
Differential Revision: D8957391
fbshipit-source-id: 42fcfe845db79726d8724efd9f6a4d37c19938ad
Summary:
This uses the latest version of `buildifier` that supports many
more Skylark syntax features.
Reviewed By: yfeldblum
Differential Revision: D8073585
fbshipit-source-id: 12322aebc09b89d5af9cc257b16c1bc0fbb066c1
Summary: When we don't explicitly set header_namespace, we can get differing behavior between Android and iOS. Even when it is not explicitly necessary, we are going to try to enforce this properly.
Reviewed By: scottrice
Differential Revision: D7141155
fbshipit-source-id: 74d1488c3909f89ad9d6d0ee0de335b789dc2ccd
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
Summary:
Make default init unavailable, as it will not initialise `YGNode` which is required for the setters
and getters of YGLayout's properties to work properly. In setters and getters we call the corresponding `YGNode`'s setters and getters. Thus the following code will crash
```
let layout = YGLayout()
layout.flexDirection = .row
```
Reviewed By: emilsjolander
Differential Revision: D6597796
fbshipit-source-id: 653d275d7314bfdd7a1106884fa3fbc0a13e1be7
Summary:
Changes so we are able to reset properties to their initial value.
This is required to reset these properties.
Add the support of YGUnitUndefined to many properties:
* minWidth
* maxWidth
* minHeight
* maxHeight
Also, these properties must be reset to YGUnitAuto.
* width
* height
* flexBasis
This now matches completely how these properties are initialized in Yoga.cpp
Closes https://github.com/facebook/yoga/pull/672
Reviewed By: dshahidehpour
Differential Revision: D6407908
Pulled By: emilsjolander
fbshipit-source-id: ac20c7b2c06349115aea7d31240204d17e2f1b44
Summary:
It is very inconvenient to enter block attribute name for each view in Objective-C.
Closes https://github.com/facebook/yoga/pull/618
Differential Revision: D6408138
Pulled By: emilsjolander
fbshipit-source-id: 71fe8eadda7233e5055560667d0fc3840ab7259b
Summary: For our -objc efforts we'll be excluding vendorlibs from these changes for now and then working on getting them to not have to be fully linked as a second effort. The way -objc flag works is its an all or nothing flag for the app and thus for any library we still want to link completely we'll have to add a link_whole = True to the BUCK file. (Otherwise we'll have crashes in these libraries :P).
Reviewed By: kastiglione
Differential Revision: D6252740
fbshipit-source-id: fe074977a11b70c4aa63a4c69cb7518906c98eb9
Summary:
Only add UIView nodes to Yoga where they are enabled.
We check for it in `isLeaf` but I think we should also check for them in the check for sub views.
Closes https://github.com/facebook/yoga/pull/609
Reviewed By: emilsjolander
Differential Revision: D5643387
Pulled By: dshahidehpour
fbshipit-source-id: a85c62b6b2e0120b2913e7f2df8b094d43ca49a6
Summary:
This is an easy diff to wrap YGPointValue() in an extern "C" block to make sure it compiles
when we are using inside of Objective-C++ classes.
Reviewed By: emilsjolander
Differential Revision: D5242366
fbshipit-source-id: 772aaac056b3a20041926d5f35128716848a271a
Summary: To fix builds where `sdks =` is not supported.
Reviewed By: splhack
Differential Revision: D5113020
fbshipit-source-id: b716acd6fb88ccb55c72b24f9fcdf20a2ea3693e
Summary:
calculateLayoutWithSize: can be useful when calculating table/collection view sizes before the views are fully laid out by UIKit.
Closes https://github.com/facebook/yoga/pull/558
Differential Revision: D5104863
Pulled By: emilsjolander
fbshipit-source-id: e0e0c6d502f6745be8d84de8c1b6e24cc25a0352