Summary: Bump version to 1.16.0 for new yoga release
Reviewed By: amir-shalem
Differential Revision: D17395785
fbshipit-source-id: b01b31d58b5b1a2a9532e9cce0892c08960ec31c
Summary:
Fixes the yoga build 1:15:0 build issue
Could not find yoga:libfb:unspecified.
Required by:
project :app > com.facebook.yoga:yoga:1.15.0
libfb dependency was added to solve import issue in YogaPhantomJNIRefs but since we don't have that file now in codebase , it will not be a problem.
Reviewed By: amir-shalem
Differential Revision: D17395380
fbshipit-source-id: ab8eb2c89afe29b4688787db2214c328d875041e
Summary: Bumping version to 1.15.0 for new yoga release
Reviewed By: amir-shalem
Differential Revision: D17394805
fbshipit-source-id: de43e97a0c155f332ecbe4e98b78c2f7c9ffe771
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/927
When D16220924 brought a new fbjni copy (with new directories), we forgot to fix the cmake files which are used by gradle build system.
Reviewed By: SidharthGuglani
Differential Revision: D17367160
fbshipit-source-id: 3e7d20d4c53ff3012a164bf6e32f1000ecb3ffc2
Summary:
Add standalone factory classes which generate YogaNode + YogaConfig, later on it will allow us to separate the yoga interface and actual implementation buck targets (see D17266406)
We've done such breakage change previously in D14122974.
Reviewed By: SidharthGuglani
Differential Revision: D17258196
fbshipit-source-id: b12f1a0d23c3f82b14cee0731a1daf1c015ee32c
Summary:
Removed unused file YogaNodeJNIPhantomRefs.java as this was causing oss build failures because of an import.
````:yoga:compileDebugJavaWithJavac/home/travis/build/facebook/yoga/java/com/facebook/yoga/YogaNodeJNIPhantomRefs.java:9: error: package com.facebook.jni does not exist
import com.facebook.jni.DestructorThread;
^
/home/travis/build/facebook/yoga/java/com/facebook/yoga/YogaNodeJNIPhantomRefs.java:30: error: package DestructorThread does not exist
new DestructorThread.Destructor(node) {
^
2 errors
FAILED
Reviewed By: pasqualeanatriello
Differential Revision: D17257330
fbshipit-source-id: 98b0c5d5b7dcd94bee559b58194c13b07f47723d
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/925
Gradle is failing to compile yoga for two reasons:
1. Ever since `YogaNodeJNIPhantomRefs` was introduced which uses `DestructorThread.Destructor` from fbjni which was the first direct Java dependency from yoga java to fbjni java code.
2. Adding a missing gradle endpoint for `testutil` since it is now required for yoga unit-tests
Reviewed By: SidharthGuglani
Differential Revision: D17274226
fbshipit-source-id: 3df9648321162d34f81fd3675ca1474e8a1c6d3a
Summary:
clang 6.0 install was failing in yoga oss tests
Travis has made xenial as default distribution
https://changelog.travis-ci.com/xenial-as-the-default-build-environment-is-coming-97772
Added dist: trusty to the configuration to fix this.
Reviewed By: passy
Differential Revision: D17257300
fbshipit-source-id: f9fcd6ba774dad1c28bd953c0d850c7078d02015
Summary:
In order to foster healthy open source communities, we're adopting the
[Contributor Covenant](https://www.contributor-covenant.org/). It has been
built by open source community members and represents a shared understanding of
what is expected from a healthy community.
Reviewed By: josephsavona, danobi, rdzhabarov
Differential Revision: D17104640
fbshipit-source-id: d210000de686c5f0d97d602b50472d5869bc6a49
Summary:
Use the Yoga dependency instead which can be deduplicated by Gradle.
This solves (parts of) a bunch of issues concerning the use of
multiple FB libraries in one Android project.
Reviewed By: danielbuechele
Differential Revision: D16783243
fbshipit-source-id: 7f7915821dd286c51ec4ccbd95a2cdcb18b53bde
Summary: The artifacts generated otherwise can cause issues in Android projects.
Reviewed By: SidharthGuglani
Differential Revision: D16803253
fbshipit-source-id: db139560dfbddb917c27bdfd80e1bf5747e4a74b
Summary:
We need one place, any place really, to publish that good old `DoNotStrip` annotation
from that we currently copy across various repos, causing havoc for anybody who
tries to integrate more than one FB Android library into their project.
Yoga is very well positioned for this because it's already its own Gradle module and
all that's missing are these few lines.
Reviewed By: SidharthGuglani
Differential Revision: D16783035
fbshipit-source-id: 69b6224a725194d036c6a23a36bd76d3487b9811
Summary:
Use an array for counting measure callbacks due to each reason.
and this is now added as qpl metadata in Layout Calculation qpl event
Reviewed By: davidaurelio
Differential Revision: D16666786
fbshipit-source-id: ff85fba835148f06b9c5d90c4604e552a813777a
Summary:
No need for a copy here.
Pull Request resolved: https://github.com/facebook/yoga/pull/919
Differential Revision: D16701461
Pulled By: davidaurelio
fbshipit-source-id: 3a90adbb2b5c43d5aefe693a8525aa3a37e53b3d
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:
This adds the root of the source tree to the include path, which allow `#include <yoga/YGEnums.h>` to work.
Fixes https://github.com/facebook/yoga/issues/908
Pull Request resolved: https://github.com/facebook/yoga/pull/909
Differential Revision: D16701716
Pulled By: davidaurelio
fbshipit-source-id: 0fdc6479e4f3119a3e4ddbcd4b48541b282c1bbd
Summary:
As far as I can tell now. Would be nice if you had an actual changelog somewhere!
Pull Request resolved: https://github.com/facebook/yoga/pull/907
Differential Revision: D16701738
Pulled By: davidaurelio
fbshipit-source-id: cf32dc96eca5258979bcaa9947d6ed6b5496398d
Summary: Replaces the usage of C++ bitfields with our portable `Bitfield` class.
Reviewed By: SidharthGuglani
Differential Revision: D16656361
fbshipit-source-id: 05f679e2e994e109b2bd1090c879d6850fabdc40
Summary:
@public
Removes the style properties bitmask. We have used this for experimentation, and it's no longer necessary.
This simplifyies the code, and allows us to cut over to `Bitfield.h` more easily.
Reviewed By: astreet
Differential Revision: D16648862
fbshipit-source-id: 17c0899807af976f4ba34db54f8f0f6a3cd92519
Summary:
@public
Our usage of C++ bit fields has lead to quite some problems with different compiler setups. Problems include sign bits, alignment, etc.
Here we introduce a portable implementation as a variadic template, allowing the user to store a number of booleans and enums (defined with `YG_ENUM_SEQ_DECL`) in an unsigned integer type of their choice.
This will replace all usages of bit fields across the Yoga code base.
Differential Revision: D16647801
fbshipit-source-id: 230ffab500885a3ad662ea8f19e35a5e9357a563
Summary: We want to use the yoga playground as a standalone package as well. This adds a webpack config to bundle the playground for npm. The package can then be distributed as `yoga-playground` via npm
Reviewed By: fabiomassimo
Differential Revision: D16583334
fbshipit-source-id: 84807ddd8983ba9f0fb43570b518c975f35544ab
Summary:
Added an array to maintain the counts of each of the reason of measure callbacks
and this is now added as qpl metadata in Layout Calculation qpl event
Reviewed By: davidaurelio
Differential Revision: D16516379
fbshipit-source-id: 201c5d2463f0a921841a0bbfec8f4d5e007000c8
Summary:
We had flex as a reason for both layout and measure. Now creating separating reason flexLayout and flexMeasure in this diff.
Also changed ordering of items in Enum to group layout and measure reasons
Reviewed By: davidaurelio
Differential Revision: D16562350
fbshipit-source-id: 75501f9d4dde0974009193b3991a8acc97b02ad0
Summary:
Fixes vulnerability in mem dependency by updating the version of flow-copy-source in javascript/yarn.lock
da4e4398cb
Reviewed By: danielbuechele
Differential Revision: D16542191
fbshipit-source-id: e900ac2d358883fc269688b93faad3ffbec10f0d
Summary:
This diffs removes the usages of getInstanceCount as it has been removed from yoga.
We will add event support in js later to handle these test cases
Reviewed By: davidaurelio
Differential Revision: D16560269
fbshipit-source-id: 52590c426faf87209f8635602b401fd5760af8ab
Summary: Update build file to include subdirectories of yoga also in sources
Reviewed By: davidaurelio
Differential Revision: D16560253
fbshipit-source-id: 5dee4379912e003d4a1fa611882fbf736321615c
Summary:
# Disclaimer:
I might be missing something as the solution I implemented here seems like something that was considered by original author. If this solution isn't good, I have a plan B.
# Problem:
`onDismiss` prop isn't being called once the modal is dismissed, this diff fixes it.
Also I've noticed that `onDismiss` is meant to only work on iOS, why is that? By landing this diff, it'll be called on Android as well so we need to change the docs (https://facebook.github.io/react-native/docs/modal.html#ondismiss).
## Video that shows the problem
Following code is in playground.js P70222409 which just increments number everytime onDismiss is called
{F166303269}
Reviewed By: shergin
Differential Revision: D16109536
fbshipit-source-id: 3fba56f5671912387b217f03b613dffd89614c9d
Summary: Adds a subclass of `YogaNodeJNIBase` that uses `PhantomReference` for deallocating native memory rather than `Object#finalize()`. This should help making garbage collection more efficient.
Reviewed By: amir-shalem
Differential Revision: D16182667
fbshipit-source-id: d310fdb6af184168c43462b24f5e18ab5d0d7ad0
Summary: Adds internal API that we can use to conduct experiments.
Reviewed By: SidharthGuglani
Differential Revision: D16340463
fbshipit-source-id: 07a8bb7dbc4a02c5c95f1ad29b18845ab43752cf
Summary: Using enum struct for using enums in form ENUM_NAME::ENUM_VALUE for better code readablility
Reviewed By: davidaurelio
Differential Revision: D16356562
fbshipit-source-id: cbe7adadad78eb5d0756c44679c0e102b7d31ec6
Summary:
`YGStyle` puts Yoga enums (which are signed integers by default) into bitfields: https://fburl.com/7fowlunu
Mixing signed values and bit-fields can be error-prone and it also fails to build on Windows with `clang-cl` due to `-Wbitfield-constant-conversion` warning being treated as error:
```
stderr: In file included from xplat\yoga\yoga\YGLayout.cpp:8:
In file included from xplat\yoga\yoga/Utils.h:8:
In file included from xplat\yoga\yoga/YGNode.h:13:
xplat\yoga\yoga/YGStyle.h(110,9): error: implicit truncation from 'YGAlign' to bit-field changes value from 4 to -4 [-Werror,-Wbitfield-constant-conversion]
alignItems_(YGAlignStretch),
```
This diff fixes the problem by making all enums unsigned integers. This change can be problematic only if values of the enums are serialized somewhere. CC: David Aurelio
Reviewed By: davidaurelio
Differential Revision: D16336729
fbshipit-source-id: ee4dabd7bd1ee429e644bd322b375ec2694cc742
Summary:
Upgrades Yoga’s copy of *fbjni* to the latest version.
This will enable us
- to move from `finalize()` to `PhantomReference` to deallocate native memory, with the potential of making GC more efficient.
- to remove the internal dependency to *libfb,* allowing apps without an own dependency to ship less code
Reviewed By: passy
Differential Revision: D16220924
fbshipit-source-id: e8233fe2b5403946ff51f43cb6def558ded52fda
Summary:
Before we can upgrade to latest fbjni, we need to make sure our shared libraries are named the same.
Currently when we compile libfbjni it is named as `liblib_fb_fbjni.so`, where as the regular fbjni is expected to be named as `libfbjni.so`
Reviewed By: davidaurelio
Differential Revision: D16250801
fbshipit-source-id: 9a7f0f803d7e525985b40a49edcc0e660e9025f5
Summary: Removed classes YogaNodeJNI and YogaNodeJNIBatching and all the logic have been moved to base class
Reviewed By: davidaurelio
Differential Revision: D16221484
fbshipit-source-id: 830819f5bc6010291b8bc0c6d90897cea991909f
Summary: Removes config param useBatchingForLayoutOutputs and now we are using batching of layout outputs as float array while passing data from c++ to java
Reviewed By: davidaurelio
Differential Revision: D16221483
fbshipit-source-id: 326c668d4dfd13b2cf031f98a84bfa50b1440513
Summary:
- Events are our new approach to instrumentation, and keeping debug code out of the core library
- This has run internally at FB for some time now
- Enabling for OSS, too, to make Java tests pass
Reviewed By: SidharthGuglani
Differential Revision: D16202541
fbshipit-source-id: c13f5270f04bba59f9f0a06d9c793da92b73d4ff
Summary:
Fixes test execution for open source:
- adds hamcrest jar and dependency, as required by buck (to not throw `"Unable to locate hamcrest on the classpath. Please add as a test dependency."`)
- enables events for OSS, to make tests pass
Reviewed By: SidharthGuglani
Differential Revision: D16202542
fbshipit-source-id: a56069de162f739b3b989961b5dc00f3d37f5849
Summary: Add tests for measure and baseline events , same as we had in InstrumentationTests for marker based approach
Reviewed By: davidaurelio
Differential Revision: D16074402
fbshipit-source-id: 8b11cd6468420428701fd5be5c57700cbd913d23