Skip to content

Disable SwiftPM for xcode-analyze - #9666

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
stuartmorgan-g:swiftpm-disable-for-analyze
Aug 18, 2025
Merged

Disable SwiftPM for xcode-analyze#9666
auto-submit[bot] merged 3 commits into
flutter:mainfrom
stuartmorgan-g:swiftpm-disable-for-analyze

Conversation

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Until flutter/flutter#172427 is resolved, xcode-analyze doesn't work as desired with SwiftPM enabled (it analyzes only the test code, not the plugin code). To avoid losing analysis coverage in the meantime, this disabled SwiftPM temporarily while running analysis.

This PR also updates build-examples to use the newer pubspec-based config option to set the SwiftPM flag state instead of setting global state, to avoid future issues where we are unintentionally bleeding flag changes across different tests, and to make local runs not impact developer machine state.

To unit test this functionality, this adds a new feature to the existing process mock system that allows running an arbitrary test callback at the ponit where a process is being run, which in this case allows reading the temporarily-modified pubspec contents at the right point in the command execution.

Fixes flutter/flutter#171442

Pre-Review Checklist

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

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

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[packages] Xcode analysis failing on stable only

3 participants