Skip to content

[tool] Apply SwiftPM to non-plugin builds too#11265

Merged
stuartmorgan-g merged 1 commit intoflutter:mainfrom
stuartmorgan-g:spm-handle-non-plugin-examples
Mar 16, 2026
Merged

[tool] Apply SwiftPM to non-plugin builds too#11265
stuartmorgan-g merged 1 commit intoflutter:mainfrom
stuartmorgan-g:spm-handle-non-plugin-examples

Conversation

@stuartmorgan-g
Copy link
Collaborator

The --swift-package-manager flag for build-exampes was incorrectly only applying the override to plugin examples; any app build can have transitive plugin dependencies, and the flag should cause those to be built with Swift Package Manager.

Fixes current tree breakage on stable.

The `--swift-package-manager` flag for `build-exampes` was incorrectly
only applying the override to plugin examples; any app build can have
transitive plugin dependencies, and the flag should cause those to be
built with Swift Package Manager.
@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label Mar 16, 2026
@stuartmorgan-g
Copy link
Collaborator Author

If we keep hitting new things I missed, I'll do a PR to just set the global config to true at the start of tasks that should be testing with SwitPM, since I don't think we are doing any intentional different build modes within the same task. I'm trying to avoid that though, since people may use this flag locally too, and I'd like it to work as well as possible.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the build-examples command to apply the --swift-package-manager flag to all example builds, including those for non-plugin packages. Previously, this flag was only applied to plugin examples. The change removes the condition that checked if a package is a plugin before applying the Swift Package Manager configuration. A new test is added to verify that the Swift Package Manager override is correctly applied to a non-plugin package's example during the build and then reverted.

Copy link
Contributor

@mboetger mboetger left a comment

Choose a reason for hiding this comment

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

LGTM

@stuartmorgan-g
Copy link
Collaborator Author

As with the previous PR, landing manually since Android FTL tests are in a bad state right now and this PR should fix tree breakage, and doesn't affect Android tasks.

@stuartmorgan-g stuartmorgan-g merged commit a9d36fb into flutter:main Mar 16, 2026
70 of 81 checks passed
@stuartmorgan-g stuartmorgan-g deleted the spm-handle-non-plugin-examples branch March 16, 2026 18:23
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 17, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 17, 2026
flutter/packages@0f2eeae...a9d36fb

2026-03-16 stuartmorgan@google.com [tool] Apply SwiftPM to non-plugin
builds too (flutter/packages#11265)
2026-03-16 stuartmorgan@google.com [tool] Fix fetch-deps handling of
SwiftPM (flutter/packages#11261)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
reidbaker pushed a commit that referenced this pull request Mar 17, 2026
The `--swift-package-manager` flag for `build-exampes` was incorrectly
only applying the override to plugin examples; any app build can have
transitive plugin dependencies, and the flag should cause those to be
built with Swift Package Manager.

Fixes current tree breakage on `stable`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants