Commit Graph

10 Commits

Author SHA1 Message Date
Tatiana Kapos 2d64d1d693 Fix RawPropsParser for Windows (#33432)
Summary:
Changes in https://github.com/facebook/react-native/compare/7cece3423...189c2c895 broke build for Windows because of a conversion from size_t to int. Adds a static cast to int to fix the error and restore windows build

Error Message
```
##[error]node_modules\react-native\ReactCommon\react\renderer\core\RawPropsParser.cpp(100,42): Error C2220: the following warning is treated as an error
     3>D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\core\RawPropsParser.cpp(100,42): error C2220: the following warning is treated as an error [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
##[warning]node_modules\react-native\ReactCommon\react\renderer\core\RawPropsParser.cpp(100,42): **Warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data**
     3>D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\core\RawPropsParser.cpp(100,42): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
```

## Changelog

[General] [Fixed] - Restore Windows build with RawPropsParser.cpp

Pull Request resolved: https://github.com/facebook/react-native/pull/33432

Test Plan: Tested locally and changes pass in the react-native-windows pipeline, change is being merged into the main branch of react-native-windows.

Reviewed By: philIip

Differential Revision: D34907928

Pulled By: javache

fbshipit-source-id: 8b76cbef0b637f2d607a8aefd2998322c3245713
2022-03-17 03:58:57 -07:00
Pieter De Baets 4b1c8584e1 Remove size_ field from RawPropsParser
Summary:
`size_` will always match `keys_.size()` so we don't have to keep track of it.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D34391445

fbshipit-source-id: f6c9316c989137425abfb7b3d72b571d08240f34
2022-02-25 04:08:01 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Andrew Coates 4d87d8c6b2 Fix various c++ warnings (#31399)
Summary:
react-native-windows runs with a more strict set of warnings as errors.  This fixes a bunch of warnings being hit while compiling core react-native code as part of react-native-windows.  In particular warnings about mismatched signed/unsigned comparisons, lossy conversions, and variable names that conflict with names in outer scopes (yoga has a global for `leading` and `trailing` that conflicts with some local variable names)

## Changelog

[Internal] [Fixed] - Fix various C++ warnings

Pull Request resolved: https://github.com/facebook/react-native/pull/31399

Test Plan: I've run these changes in react-native-windows. -- Shouldn't have any functionality difference.

Reviewed By: sammy-SC

Differential Revision: D28290188

Pulled By: rozele

fbshipit-source-id: 2f7cf87f58d73a3f43510ac888dbcb9ab177d134
2021-05-12 12:35:33 -07:00
Andrew Coates 81c895fb3f Fix various C++ warnings (#31002)
Summary:
Fix warnings about implicit type truncation.

## Changelog

[Internal] [Fixed] - Fix various C++ warnings

Pull Request resolved: https://github.com/facebook/react-native/pull/31002

Test Plan:
Almost all the changes here are simply making explicit conversions which are already occurring.  With the exception of a couple of constants being changed from doubles to floats.

With these changes I am able to remove a bunch of warning suppressions in react-native-windows.

Reviewed By: shergin

Differential Revision: D26900502

Pulled By: rozele

fbshipit-source-id: d5e415282815c2212a840a863713287bbf118c10
2021-03-10 12:39:12 -08:00
Joshua Gross a0d740a04a RN_DEBUG -> REACT_NATIVE_DEBUG
Summary:
Use REACT_NATIVE_DEBUG for consistent branding and to prevent potential collisions with other codebases.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26517424

fbshipit-source-id: c85740d4e5320cc14023eb6f521bb1a242ae56fe
2021-02-18 14:31:57 -08:00
Joshua Gross d93b7c3369 Rename rn_assert to react_native_assert
Summary:
Keep consistent branding of rn -> react_native

Changelog: [Internal]

Reviewed By: fkgozali, mdvacca

Differential Revision: D26517069

fbshipit-source-id: 32fd3e52ee91e7ae72b6022535cb99ffc5b12303
2021-02-18 14:31:57 -08:00
Joshua Gross 16cf45ac3d Migrate Differentiator and RawPropsParser to rn_assert
Summary:
This will allow these asserts to crash on Android debug builds.

We will migrate more sites as we confirm this is stable through testing.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26409354

fbshipit-source-id: fb35cd8de29890f7c2b761435eaa02de377bdd1e
2021-02-17 18:00:47 -08:00
Joshua Gross 77accf2380 Log more diagnostics when JSI values cannot be cast to Object
Summary:
There are a few places where we cast JSI values to objects without much validation and without proper error logging, and in some places the crashes aren't symbolicated well. To make debugging easier in the short-term, I'm adding some additional logs.

Changelog: [Internal]

Reviewed By: mdvacca, RSNara

Differential Revision: D23033222

fbshipit-source-id: 9343d693a441f0af728e560a0c245bcc4eb97869
2020-08-10 16:08:50 -07:00
David Vacca 1ae76bf0dd Remove inner folders of react/renderer/core
Summary:
This diff removes the inner folder of react/renderer/core, moving all its files into react/renderer/core

This is necessary to simplify the compilation of Fabric in OSS

More details: https://fb.quip.com/amaRA631DX3K

changelog: [internal] Internal

Reviewed By: fkgozali, JoshuaGross

Differential Revision: D22875854

fbshipit-source-id: e2d969c3ec67eab1bbdc9288e5a4285c740fa944
2020-08-01 13:31:03 -07:00