Skip to content

Compare canonical paths in PreparePrefabHeadersTaskTest - #60375

Merged
cortinico merged 1 commit into
react:mainfrom
expo:@ide/gradle-prefab-headers-test-symlink
Dec 4, 2026
Merged

cortinico merged 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

On main the test fails with the output above. Not run on Linux.

`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
@github-actions

Copy link
Copy Markdown

Visual regression

No visual differences at b792ccbb5431.

ios: no capture

@ide
ide marked this pull request as ready for review November 29, 2026 12:03
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 29, 2026

@chrfalch chrfalch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, can be approved

@chrfalch chrfalch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, LGTM.

@cortinico
cortinico merged commit e14cb1b into react:main Dec 4, 2026
74 checks passed
@ide
ide deleted the @ide/gradle-prefab-headers-test-symlink branch December 4, 2026 10:36
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants