Guard cxxreact MethodCall tests under legacy-arch macro#56902
Closed
christophpurrer wants to merge 1 commit into
Closed
Guard cxxreact MethodCall tests under legacy-arch macro#56902christophpurrer wants to merge 1 commit into
christophpurrer wants to merge 1 commit into
Conversation
Summary: `parseMethodCalls` (used by `packages/react-native/ReactCommon/cxxreact/tests/methodcall.cpp`) is only declared in `<cxxreact/MethodCall.h>` when legacy architecture support is compiled in. Wrap the test body in `#ifndef RCT_REMOVE_LEGACY_ARCH` so the translation unit compiles to a no-op when legacy arch is removed, instead of failing with `use of undeclared identifier 'parseMethodCalls'`. Also configure the `tests` target so its Apple builds run under a target platform that carries the `react-fit-enabled` constraint. A new per-package `apple_target_platforms()` declares `tests-apple-platform`, and the `rn_xplat_cxx_test` rule wires it in via `fbobjc_ios_config_backed_target_platform` / `fbobjc_macosx_config_backed_target_platform`. Under that configuration `RCT_REMOVE_LEGACY_ARCH` is defined and the guarded test body is elided, matching the behavior of the rest of the post-legacy-arch test suite. Changelog: [Internal] Differential Revision: D105737807
|
@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105737807. |
|
This pull request has been merged in 3cfe3e3. |
Collaborator
|
This pull request was successfully merged by @christophpurrer in 3cfe3e3 When will my fix make it into a release? | How to file a pick request? |
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:
parseMethodCalls(used bypackages/react-native/ReactCommon/cxxreact/tests/methodcall.cpp) is only declared in<cxxreact/MethodCall.h>when legacy architecture support is compiled in. Wrap the test body in#ifndef RCT_REMOVE_LEGACY_ARCHso the translation unit compiles to a no-op when legacy arch is removed, instead of failing withuse of undeclared identifier 'parseMethodCalls'.Also configure the
teststarget so its Apple builds run under a target platform that carries thereact-fit-enabledconstraint. A new per-packageapple_target_platforms()declarestests-apple-platform, and thern_xplat_cxx_testrule wires it in viafbobjc_ios_config_backed_target_platform/fbobjc_macosx_config_backed_target_platform. Under that configurationRCT_REMOVE_LEGACY_ARCHis defined and the guarded test body is elided, matching the behavior of the rest of the post-legacy-arch test suite.Changelog: [Internal]
Differential Revision: D105737807