Repository navigation
Commit 7b11d48
Restore public parseUnprocessedTransformOriginString (#58893)
Summary:
The Android `react-native-unistyles` job in the [nightly tests](https://github.com/react-native-community/nightly-tests/actions/runs/37455000546) has failed since the `20261003` nightly:
```
TransformOriginConverter.cpp:124:20: error: no member named
'parseUnprocessedTransformOriginString' in namespace 'facebook::react'
```
#58786 moved the transform-origin helpers from `react/renderer/components/view/conversions.h` into `conversions.cpp`. One of them, `parseUnprocessedTransformOriginString`, was an inline function in the public header, and it ended up in an anonymous namespace in the `.cpp`. Libraries can't call it anymore. Unistyles calls it on React Native 0.85 and newer (only when `RN_SERIALIZABLE_STATE` is defined, so in practice only on Android).
This change declares `parseUnprocessedTransformOriginString(const std::string&, TransformOrigin&)` in `conversions.h` again and moves its definition out of the anonymous namespace. The implementation stays in `conversions.cpp`, and the signature uses only `std::string` and `TransformOrigin`, so no CSS headers leak back into the public header. The other helpers #58786 made private stay private.
## Changelog:
[GENERAL] [FIXED] - Restore public `parseUnprocessedTransformOriginString` in `react/renderer/components/view/conversions.h`
Pull Request resolved: #58893
Test Plan:
- Regenerated the C++ API snapshots with Doxygen 1.16.1, the version CI uses: `python -m scripts.cxx-api.parser`. For the Common and Apple views, the only diff this change causes is one restored line: `void facebook::react::parseUnprocessedTransformOriginString(const std::string& value, facebook::react::TransformOrigin& result);`. That is the same line #58786 removed. My local Apple output also had extra codegen entries for the sample TurboModule, so I left those out of the commit.
- In my environment the Android views fail to generate even on clean `main` (`Identifier basic_appender already exists in scope v12`). I added the same line by hand to the three Android snapshots, at the position #58786 removed it from. The `validate-cxx-api-snapshots` job will confirm them.
- `yarn format-check-cpp`: no violations in repository files.
- I couldn't build the C++ locally, so I'm relying on CI for compilation. The change only moves an existing function definition out of an anonymous namespace and adds its declaration.
- After this lands, the Android unistyles job in the nightly tests should compile `TransformOriginConverter.cpp` again.
Reviewed By: christophpurrer
Differential Revision: D123667938
Pulled By: cipolleschi
fbshipit-source-id: 65460434bcf100b35149d077da18c42897e46bea1 parent 0605e8e commit 7b11d48
11 files changed
Lines changed: 15 additions & 0 deletions
File tree
- packages/react-native/ReactCommon/react/renderer/components/view
- scripts/cxx-api/api-snapshots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| 724 | + | |
| 725 | + | |
724 | 726 | | |
725 | 727 | | |
726 | 728 | | |
| |||
752 | 754 | | |
753 | 755 | | |
754 | 756 | | |
| 757 | + | |
| 758 | + | |
755 | 759 | | |
756 | 760 | | |
757 | 761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
461 | 463 | | |
462 | 464 | | |
463 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
| 1150 | + | |
1150 | 1151 | | |
1151 | 1152 | | |
1152 | 1153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
| 1146 | + | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | 1149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1147 | 1147 | | |
1148 | 1148 | | |
1149 | 1149 | | |
| 1150 | + | |
1150 | 1151 | | |
1151 | 1152 | | |
1152 | 1153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3947 | 3947 | | |
3948 | 3948 | | |
3949 | 3949 | | |
| 3950 | + | |
3950 | 3951 | | |
3951 | 3952 | | |
3952 | 3953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3936 | 3936 | | |
3937 | 3937 | | |
3938 | 3938 | | |
| 3939 | + | |
3939 | 3940 | | |
3940 | 3941 | | |
3941 | 3942 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3947 | 3947 | | |
3948 | 3948 | | |
3949 | 3949 | | |
| 3950 | + | |
3950 | 3951 | | |
3951 | 3952 | | |
3952 | 3953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
| 709 | + | |
709 | 710 | | |
710 | 711 | | |
711 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| 706 | + | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| |||
0 commit comments