Skip to content

Mark the SPM autolinking sync phase as always running - #59241

Open
mrousavy wants to merge 1 commit into
react:mainfrom
mrousavy:fix/spm-sync-build-phase
Open

mrousavy wants to merge 1 commit into
react:mainfrom
mrousavy:fix/spm-sync-build-phase

Conversation

@mrousavy

Copy link
Copy Markdown
Contributor

Summary:

Xcode warns that Sync SPM Autolinking runs on every build because the generated phase has no declared outputs. The script intentionally checks its own stamp and dynamically discovered inputs on every build, then skips regeneration when they are unchanged.

Set alwaysOutOfDate = 1 when creating or updating this phase. Existing projects receive the setting on their next spm update. Plugin phases keep their own dependency-analysis settings.

Changelog:

[IOS] [FIXED] - Remove the missing-output warning from the generated SPM autolinking sync phase.

Test Plan:

  • Jest 29.7.0: all 286 tests passed across inject-spm-xcodeproj-test.js, generate-spm-xcodeproj-test.js and remove-spm-injection-test.js, run with --runInBand, testEnvironment: "node" and transform: {}. This includes the script's existing stamp checks, injection/removal and plugin-phase reconciliation tests.
  • The three regression cases fail against the original generator: creating the phase, updating a phase without the flag, and updating a phase with the flag disabled. Both update cases verify that a further run leaves the project unchanged.
  • prettier@3.9.4 --check on the three changed files and git diff --check passed.

No native app build was run for this project-generation change.

@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 Oct 20, 2026
@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 Oct 20, 2026

@cipolleschi cipolleschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for fixing this.

@meta-codesync

meta-codesync Bot commented Oct 21, 2026

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D126658662.

@cipolleschi

Copy link
Copy Markdown
Contributor

@mrousavy the test_js signals are failing in CI. Can you have a look at them and fix them?

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. 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.

2 participants