Skip to content

fix(0.81, tests): restore macOS native test-host compilation - #3180

Open
Jason Morse (JasonVMo) wants to merge 1 commit into
0.81-stablefrom
0.81/user/jasonvmo/native-test-host
Open

Jason Morse (JasonVMo) wants to merge 1 commit into
0.81-stablefrom
0.81/user/jasonvmo/native-test-host

Conversation

@JasonVMo

Copy link
Copy Markdown

Summary:

Backport the source-compatible image and gzip fixes from #3095, by Ty Rauber
(742d47b5728a and 60f09c46099b), to 0.81-stable:

  • Use the existing RCTPlatformImage alias in shared image tests. The macOS
    target currently fails to compile their UIKit-only UIImage references.
  • Declare RCTIsGzippedData with RCT_EXTERN in its existing header so the
    Objective-C++ implementation has the C linkage expected by Objective-C tests.
  • Include the same one-field stable-dist-tag resolver correction as fix(0.81, fabric): synchronize native props across shadow node clones #3177;
    otherwise this branch's unchanged Nx metadata prevents its release dry run.
  • Add the branch-native Nx patch version plan, not an inert Changeset.

This is a separate native-host prerequisite for #3177. It contains no
ShadowNode, ShadowNodeFamily, UIManager, resize-fixture, FURN, or CI-workflow
changes. Main already has #3095, so no duplicate main PR is opened.

Do not copy #3095's Xcode 26.0.1 sanitizer-disable workaround: on the
current Xcode 26.4.1 toolchain the exact renderer fixture executes under both
ASan and TSan. Sanitizer/test-plan policy is unchanged by this PR.

Test Plan:

Before the repair, the owned 0.81 native host failed before executing any test
with unknown type name 'UIImage' in the unchanged RCTImageLoaderTests.m.
After applying these exact four source-file changes in an isolated Paper
qualification worktree together with #3177's renderer fix:

  • The existing macOS XCTest target builds and links.
  • 9 existing tests pass: six RCTShadowViewTests and three RCTGzipTests.
  • No test assertions or test source membership were removed.

Exact native command from that qualification root
(NATIVE_PROPS_EVIDENCE denotes its local artifact directory):

RCT_NO_LAUNCH_PACKAGER=1 xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester-macOS -sdk macosx -destination 'platform=macOS,arch=arm64' -configuration Debug -jobs 2 -derivedDataPath "$NATIVE_PROPS_EVIDENCE/build-patched081-paper-app" -resultBundlePath "$NATIVE_PROPS_EVIDENCE/results-patched081-paper-focused.xcresult" CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO -enableAddressSanitizer NO -enableThreadSanitizer NO -enableUndefinedBehaviorSanitizer NO -parallel-testing-enabled NO -only-testing:RNTester-macOSUnitTests/RCTShadowViewTests -only-testing:RNTester-macOSUnitTests/RCTGzipTests test
# PASSED: TEST SUCCEEDED, 9 tests, 0 failures.

Pods were regenerated from packages/rn-tester with
RCT_NEW_ARCH_ENABLED=0 bundle exec pod install using the fork-root Gemfile.
The local qualification profile disables the pre-existing retry behavior;
that profile override is not part of this PR. No sanitizer qualification is
claimed from these ordinary Paper tests.

Checks from this PR's worktree root:

NX_DAEMON=false yarn nx release plan:check --base=origin/0.81-stable
# PASSED: all touched projects have, or do not require, version plans.
xcrun clang-format --dry-run --Werror --lines=145:150 packages/react-native/React/Base/RCTUtils.h
xcrun clang-format --dry-run --Werror --lines=784:784 packages/react-native/React/Base/RCTUtils.mm
xcrun clang-format --dry-run --Werror --lines=12:12 packages/rn-tester/RNTesterUnitTests/RCTGzipTests.m
xcrun clang-format --dry-run --Werror --lines=10:11 --lines=40:40 --lines=75:75 --lines=85:85 --lines=135:135 --lines=146:146 --lines=185:185 packages/rn-tester/RNTesterUnitTests/RCTImageLoaderTests.m
# PASSED: all changed native ranges.
git diff --check
# PASSED.

Not run here: the entire native unit suite, image-test runtime cases, iOS
runtime tests, repository-wide JS/Flow/lint suites, or publication. Hosted CI
will provide the independent branch build/integration results. No PR is merged.

Adapt the image portability and gzip C-linkage fixes from #3095 (742d47b and 60f09c4). Keep sanitizer policy unchanged: ASan and TSan both execute with the current toolchain. This separate prerequisite makes the renderer resize regression's existing native host buildable.

Include the already-validated stable dist-tag resolver correction from #3177 so the branch's release dry run uses 0.81-stable, plus the branch-native Nx patch plan.

Co-authored-by: Ty Rauber <tyrauber@mac.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33ea5c72-8bbd-448d-aa21-c9b99dd03c96

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant