Skip to content

Compare canonical paths in PreparePrefabHeadersTaskTest - #60375

Draft
ide wants to merge 1 commit into
react:mainfrom
expo:@ide/gradle-prefab-headers-test-symlink
Draft

ide wants to merge 1 commit into
react:mainfrom
expo:@ide/gradle-prefab-headers-test-symlink

Conversation

@ide

@ide ide commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Summary:

preparePrefabHeadersTask_declaresTheHeadersItCopiesAsInputs compares the task's input files with a file under JUnit's temporary folder. On macOS that folder is under /var, a symbolic link to /private/var, and Gradle reports the inputs by canonical path, so the test fails:

Expecting actual:
  [/private/var/folders/.../T/junit4187486011033777612/input/hello.h]
to contain exactly (and in same order):
  [/var/folders/.../T/junit4187486011033777612/input/hello.h]

The test now compares canonical files on both sides.

Changelog:

[INTERNAL] [FIXED] - Fix PreparePrefabHeadersTaskTest on macOS

Test Plan:

On macOS 27 with JDK 17:

./gradlew -p packages/gradle-plugin :react-native-gradle-plugin:test --tests com.facebook.react.tasks.internal.PreparePrefabHeadersTaskTest --max-workers=4 --console=plain
  • upstream/main 94aee19ac9: 10 tests, 1 fails with the output above.
  • This branch: the build succeeds.

Also run: ktfmt --dry-run --set-exit-if-changed on the changed file (clean), git diff --check (clean). Not run on Linux.

🤖 Generated with Claude Code

`preparePrefabHeadersTask_declaresTheHeadersItCopiesAsInputs` compares
the task's input files with a file under JUnit's temporary folder. On
macOS that folder is under `/var`, a symbolic link to `/private/var`,
and Gradle reports the inputs by canonical path, so the test fails:

    Expecting actual:
      [/private/var/folders/.../input/hello.h]
    to contain exactly (and in same order):
      [/var/folders/.../input/hello.h]

Compare canonical files on both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 28, 2026

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

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant