-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Fix ReactCommon Break for Windows #33047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Base commit: cd79317 |
Oh, wow, thanks for correcting this :) |
|
||
header_.bufferSize = bufferSize; | ||
header_.bufferSize = static_cast<uint32_t>(bufferSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, would it help to have int32_t bufferSize
in header to avoid this conversion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tinkered around with it. It looks like the culprit is that the variables are summed to make up bufferSize are of type size_t which size varies (32 or 64) depending on the machine architecture causing the type conversion warning. We could make header.bufferSize of type size_t to avoid the cast but then the header will change size based on the machine architecture which I don't think would be desired.
Base commit: cd79317 |
@philIip has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @chiaramooney in 42b3917. When will my fix make it into a release? | Upcoming Releases |
Summary
Changes to MapBuffer code in aaff15c...d287598 broke build for Windows. Errors included incompatible type conversions, the use of
__attribute__(__packed__)
which is only supported by GCC and Clang, and the usage of designated initializers which are only supported on C++20.Changes here restore build on Windows.
Changelog
[General] [Fixed] - Fix build break on Windows with ReactCommon
Test Plan
React Native project built on Windows and passes react-native-windows repository pipeline. These edits are currently merged into the main branch of react-native-windows.