Add missing C++ include for prop conversion of complex array type#35984
Closed
rshest wants to merge 1 commit intofacebook:mainfrom
Closed
Add missing C++ include for prop conversion of complex array type#35984rshest wants to merge 1 commit intofacebook:mainfrom
rshest wants to merge 1 commit intofacebook:mainfrom
Conversation
Summary:
[Changelog][Internal]
Codegen for props parsing was failing to add a required include for the case when the type is an array of objects, which in turn use non-trivial types.
Something like:
```
export type NativeProps = $ReadOnly<{
...ViewProps,
bounds: $ReadOnlyArray<
$ReadOnly<{
height?: Float,
left?: Float,
top?: Float,
width?: Float,
}>,
>,
}>;
```
would cause compilation errors on C++ side, since the required header for the `Float` conversion wasn't included.
Reviewed By: cipolleschi
Differential Revision: D42781128
fbshipit-source-id: 5b0ad5c3f5740c1bcb308e56cc4c1854c8f71a6a
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D42781128 |
|
Base commit: 53932d0 |
|
This pull request was successfully merged by @rshest in a00cea4. When will my fix make it into a release? | Upcoming Releases |
cipolleschi
pushed a commit
that referenced
this pull request
Feb 13, 2023
…5984) Summary: Pull Request resolved: #35984 [Changelog][Internal] Codegen for props parsing was failing to add a required include for the case when the type is an array of objects, which in turn use non-trivial types. Something like: ``` export type NativeProps = $ReadOnly<{ ...ViewProps, bounds: $ReadOnlyArray< $ReadOnly<{ height?: Float, left?: Float, top?: Float, width?: Float, }>, >, }>; ``` would cause compilation errors on C++ side, since the required header for the `Float` conversion wasn't included. Reviewed By: cipolleschi Differential Revision: D42781128 fbshipit-source-id: d5b133b931a60e414761db0b3ed09893d3fcc9aa
Merged
This was referenced Jan 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
[Changelog][Internal]
Codegen for props parsing was failing to add a required include for the case when the type is an array of objects, which in turn use non-trivial types.
Something like:
would cause compilation errors on C++ side, since the required header for the
Floatconversion wasn't included.Reviewed By: cipolleschi
Differential Revision: D42781128