Commit Graph

25 Commits

Author SHA1 Message Date
Scott Rice 686ff70d96 Fixup references to old flag_defs.bzl in xplat/
Summary:
The source of truth has already moved, so now we just need to fix references

This diff is mostly the result of running:

```
$ tools/mobile-unification/loadmod --fixup xplat/configurations/buck/apple/flag_defs.bzl tools/build_defs/apple/
```

Then I committed with `hg commit -I xplat/`

The controller you requested could not be found.

Differential Revision: D9772194

fbshipit-source-id: 93d23ae8e1c62440c7876cad965d963bde960db9
2018-09-11 18:47:30 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Valentin Shergin 9570d7d490 Fabric: Unifying usage of `auto`s
Summary:
I was watching a classic magnificent talk about modern C++ by Herb Sutter and I was totally sold on double down on using `auto` in our codebase. Surprisingly, 95% of the code base already follows Herb's guidence; I just changed the last 5% to make it consistent.
All those changes must work *exactly* like it was before.
The talk: https://youtu.be/xnqTKD8uD64?t=28m25s

Reviewed By: mdvacca

Differential Revision: D9753301

fbshipit-source-id: 9629aa485a5d6e51806cc96306c297284d4f90b8
2018-09-10 16:50:02 -07:00
Taras Tsugrii a8a63b1560 Remove unused loads from build files.
Summary: Unused loads hurt readability and take time to process.

Reviewed By: hramos

Differential Revision: D9494120

fbshipit-source-id: 455b56efadab1cb976344cffcb427772bfda2f71
2018-08-31 18:03:07 -07:00
Jonathan Kim 2515e4861a Move RN's DEFS.bzl to tools and rename to rn_defs.bzl
Reviewed By: mzlee

Differential Revision: D9553765

fbshipit-source-id: cb65081668ea2726f24d2c9c02661e859cc7a994
2018-08-29 13:21:52 -07:00
Taras Tsugrii 12d98db901 Fix conditional load usage.
Summary:
Conditional `load` statements are not allowed in new Buck build file parser - Skylark.
https://buckbuild.com/concept/skylark.html

Reviewed By: mzlee

Differential Revision: D8842756

fbshipit-source-id: f22dff00f594978e4cab5736268ad3225182c39b
2018-07-14 18:32:20 -07:00
Valentin Shergin 62f9ced099 Fabric: Subtle changes that make GCC compiler happy
Summary:
@public
Most of them are legit issues which should not be compilable anyways (but Clang tolerates thems).

Reviewed By: mdvacca

Differential Revision: D8655539

fbshipit-source-id: 645729fb9d6a120ce1ab2b07542abcdacd72320d
2018-06-29 12:18:27 -07:00
Taras Tsugrii 346ac75ed6 Fix deprecated glob usage.
Summary: https://our.intern.facebook.com/intern/wiki/Buck/python-to-skylark/

Differential Revision: D8595731

fbshipit-source-id: 0e3046a7fd2a25e9b13462713ae9a008ad546770
2018-06-23 18:33:48 -07:00
Taras Tsugrii 1a7682b2a1 Re-format BUCK to use recommended style.
Reviewed By: yfeldblum

Differential Revision: D8073585

fbshipit-source-id: 12322aebc09b89d5af9cc257b16c1bc0fbb066c1
2018-05-20 23:24:51 -07:00
Kevin Gozali 128c9343c4 iOS: fix up RNTesterPods
Summary:
A few fixes:
* missing include: folly/Optional.h
* switch folly::Optional's `has_value()` to `hasValue()` for now until folly is upgraded to newer version
* fix up import for RCTTextAttributes.h
* fix up includes for "conversions.h" to use namespaced includes

Reviewed By: mmmulani

Differential Revision: D8021149

fbshipit-source-id: d3955986d3ab6b1d9b61ac1e385767893ce57e5e
2018-05-16 14:14:41 -07:00
Valentin Shergin 1f9676a1cb Fabric: Final cleanup of define-based props treatment
Summary: Oh, my! No more `#define`s related to props conversions and debug-printing.

Reviewed By: fkgozali

Differential Revision: D7958250

fbshipit-source-id: 86950070c55f134aa3a575b9fd68fc90d865cf44
2018-05-14 16:03:49 -07:00
Valentin Shergin 7048c9134a Fabric: Support for optionals in `convertRawProp` and `debugStringConvertibleItem` templates
Summary:
We have to have automatic treatment for `optional` types. So, if we can process type `T` we can also automatically process `optional<T>.`
Support for optional allows us to not introduce new types (with embedded special "undefined" value) or pollute existing pure types (with special "undefined" value). (A lot of examples of those types can be found in AttributedString module.)

Reviewed By: fkgozali

Differential Revision: D7958249

fbshipit-source-id: 21af526a17dd0329e1262020cab8ecb902316654
2018-05-14 16:03:49 -07:00
Valentin Shergin 03fb77cc95 Fabric: Using templates to generate convertRawProp and debugStringConvertibleItem functions
Summary:
This diff opens a diffstack where we migrate the generation of all prop conversions (convertRawProp) and pretty-printing (debugStringConvertibleItem) functions to C++ templates (instead of using `#define`s).
So, this diff implements base versions of those functions as templated functions.
For now we still need #define-based version, but eventually, we will get rid of it.

Reviewed By: fkgozali

Differential Revision: D7958247

fbshipit-source-id: 24346297c1bd17e8054758f0eb84698eebfa21e2
2018-05-14 16:03:49 -07:00
Valentin Shergin 6e537b000b Fabric: New nice way to deal with DebugStringConvertible items
Summary:
No macros in product code.
(Not all callsites are converted yet.)

Reviewed By: mdvacca

Differential Revision: D7797561

fbshipit-source-id: da899421bf99669a0e0a2b83df6004daf14355c2
2018-05-08 23:03:35 -07:00
Valentin Shergin d9ff1769aa Fabric/Text: <Paragraph> is now supporting text attributes
Summary:
I was shamed by Sebastian's sebmarkbage concerns (totally unrelated to this topic) about introducing another level of indirection into the system and decided to change my original plan not to support text attributes for the <Paragraph> component.

So, now <Paragraph> shares <View>, <Text> and <Paragraph> itself capabilities. That reduces the minimum amount of required components for trivial text fragment from three (Paragraph, Text, RawText) to two (Paragraph and RawText).

Special thanks for C++ for supporting multiple inheritance.

Reviewed By: mdvacca

Differential Revision: D7785889

fbshipit-source-id: dd9f2e2650bfbfd76d7d4b538adaf409f9429df3
2018-05-08 19:24:10 -07:00
Jonathan Kim 255b97ddd1 Load and use fb_xplat_cxx_test
Reviewed By: mzlee

Differential Revision: D7854278

fbshipit-source-id: 2a4c4fc27fc665a192fc04a8c8fae19f7f221566
2018-05-03 16:04:29 -07:00
Taras Tsugrii 1433d15557 Avoid top-level read_config invocations.
Reviewed By: danzimm

Differential Revision: D7651745

fbshipit-source-id: 5cbc82b3c9da3ab514278d438f97f98e19946dc7
2018-04-17 09:41:20 -07:00
Jakub Grzmiel a42b2988ae Clean up BUCK files for missing dependencies and tests
Differential Revision: D7618360

fbshipit-source-id: 421834892519998ad088a138b3fc3d96afe34d79
2018-04-14 13:18:08 -07:00
Kevin Gozali 1acef45977 iOS: added placeholder test setup for fabric graphics/uimanager/view targets
Reviewed By: shergin

Differential Revision: D7390366

fbshipit-source-id: d49fcc335fc03d52402676341f1da24177c6084b
2018-03-23 22:22:20 -07:00
Kevin Gozali 10c95a25cc fixed contacts for the test target
Reviewed By: mdvacca

Differential Revision: D7366977

fbshipit-source-id: 93341f8964da71a7e23049fc5d2324a0da376746
2018-03-22 10:49:44 -07:00
Kevin Gozali 6ae38feb65 Added sample iOS unit test setup for fabric/debug target
Summary: basic setup for unit testing Fabric impl

Reviewed By: hramos

Differential Revision: D7359239

fbshipit-source-id: ccaf36e775036f2fad4d8c882bce86bbbe06dd28
2018-03-21 16:40:06 -07:00
Kevin Gozali f015900d30 fixed debug string formatting for structure
Summary:
Fixed minor issue:
* use double spaces instead of a tab character for indentation
* depth should increase by 1, not 2

Reviewed By: shergin

Differential Revision: D7332803

fbshipit-source-id: 74fda2c7a4be4f509270d3074a7d71a3d4d32fe4
2018-03-21 16:40:06 -07:00
Naris Siamwalla 12535ae69d Fix clang-6 strictness surrounding virtual destructors
Reviewed By: smeenai

Differential Revision: D7326765

fbshipit-source-id: 9df477dfa89812e05e79b5e6d510bcbbc793381c
2018-03-19 15:00:09 -07:00
Valentin Shergin 378da73201 DebugStringConvertibleOptions: Formating
Summary:
DebugStringConvertibleOptions allows pretty-format debug strings.
https://pxl.cl/ch0m

Reviewed By: fkgozali

Differential Revision: D7312622

fbshipit-source-id: 0ed62520bbc521790bedf5a6d18c796b42f85658
2018-03-18 19:17:39 -07:00
Kevin Gozali 34f8e7f848 `fabric/debug` module and `DebugStringConvertible` class
Summary:
This is a very first diff in a series of undefined length implementing React Native Shadow Tree infra in C++.
All Shadow Nodes, Props and etc. implements `DebugStringConvertible`.

Authored by shergin

Reviewed By: shergin

Differential Revision: D7163868

fbshipit-source-id: 9c001aa5bd0723f709a07b1833f512c51e3bec11
2018-03-08 18:04:28 -08:00