Enable SwiftPM by default on master and beta#182923
Enable SwiftPM by default on master and beta#182923auto-submit[bot] merged 5 commits intoflutter:masterfrom
Conversation
|
Mac_ios flavors_test_ios is failing, so we'll need to wait for #183011 to land first. This is ready for review, though. |
There was a problem hiding this comment.
Code Review
This pull request enables Swift Package Manager (SwiftPM) by default on the master and beta channels. The core change is updating the swiftPackageManager feature flag. The rest of the changes are consequential updates to tests and project files. Tests that rely on CocoaPods now explicitly disable SwiftPM. Other tests are updated to reflect changes in build outputs and error messages. A benchmark project incompatible with SwiftPM is configured to opt-out. The changes appear correct and are well-tested.
|
Mac_ios flavors_test_ios is passing now 🎉 : https://ci.chromium.org/b/8688684495945505569 |
| final stderrString = stderr.toString(); | ||
| if (!stderrString.contains('The Xcode project defines schemes: free, paid')) { | ||
| if (!stderrString.contains( | ||
| 'You must specify a --flavor option to select one of the available schemes.', |
There was a problem hiding this comment.
When you use SwiftPM, packages also become schemes. So I changed the check to be part of the error that doesn't list the specific schemes
| </EnvironmentBuildable> | ||
| </ActionContent> | ||
| </ExecutionAction> | ||
| </PreActions> |
There was a problem hiding this comment.
This project couldn't be auto-migrated due to it's weird setup. Migrated manually.
Roll Flutter from 46fb7210422d to d3dd7744e81f (33 revisions) flutter/flutter@46fb721...d3dd774 2026-03-04 [email protected] Show warning when plugins do not support SwiftPM (flutter/flutter#182506) 2026-03-04 [email protected] Give guided message when project is not compatible with SwiftPM (flutter/flutter#182394) 2026-03-04 [email protected] Pass --web-define through to web runner when using --machine mode (flutter/flutter#183228) 2026-03-04 [email protected] Improve SwiftPM minimum platform mismatch diagnostics (flutter/flutter#182375) 2026-03-04 [email protected] Use dart::bin::SetupDartIo to setup dart:io (flutter/flutter#176714) 2026-03-04 [email protected] Roll Skia from 3197848b14ad to ada0b7628c79 (5 revisions) (flutter/flutter#183221) 2026-03-04 [email protected] Roll Skia from fe9e9f22c531 to 3197848b14ad (15 revisions) (flutter/flutter#183198) 2026-03-04 [email protected] refactor: remove material in reorderable_list_test, scroll_notification_test, scroll_physics_test, shortcuts_test, sliver_floating_header_test, snapshot_widget_test (flutter/flutter#182698) 2026-03-04 [email protected] refactor: remove material in pop_scope_test, route_notification_message_test, two_dimensional_utils, two_dimensional_viewport_test (flutter/flutter#182699) 2026-03-04 [email protected] Add dev/benchmarks/README.md (flutter/flutter#182976) 2026-03-03 [email protected] Roll RapidJSON to a branch based on the current upstream head (flutter/flutter#183048) 2026-03-03 [email protected] [Impeller] Update comments to reflect new info about 2-pass rendering (flutter/flutter#183050) 2026-03-03 [email protected] Add vmservices for accessibilityEvaluation (flutter/flutter#182791) 2026-03-03 [email protected] Roll Fuchsia Linux SDK from 0dCDM2oORHwDf_pyb... to JJw5EJ87vLGqFVl4h... (flutter/flutter#183177) 2026-03-03 [email protected] Support mixed color spaces in `Color.lerp` (flutter/flutter#182934) 2026-03-03 [email protected] Add warning when there is a widget with color between `Material` and `ListTile` (flutter/flutter#181402) 2026-03-03 [email protected] [ios]uitest for admob banner in scrollable list gesture issue (flutter/flutter#183128) 2026-03-03 [email protected] Roll Packages from faa4e22 to 9083bc9 (4 revisions) (flutter/flutter#183164) 2026-03-03 [email protected] Build App and native asset frameworks for Add to App FlutterPluginRegistrant (flutter/flutter#183136) 2026-03-03 [email protected] Roll Skia from f886711f180d to fe9e9f22c531 (4 revisions) (flutter/flutter#183155) 2026-03-03 [email protected] Roll Dart SDK from e86dbe9aa742 to c597ef90d2dc (2 revisions) (flutter/flutter#183147) 2026-03-03 [email protected] fix: bump matcher (flutter/flutter#183167) 2026-03-02 [email protected] Use isA to test for exceptions (flutter/flutter#183129) 2026-03-02 [email protected] [two_dimensional_scrollables] Fix tableview janks when first row/column pinned (flutter/flutter#180563) 2026-03-02 [email protected] Add await to callsites of BasicMessageChannel.send (flutter/flutter#182868) 2026-03-02 [email protected] Roll pub packages (flutter/flutter#183133) 2026-03-02 [email protected] Improve FFI code for windowing (flutter/flutter#183098) 2026-03-02 [email protected] [workflow] Update the changelog merge action to fetch the stable branch (flutter/flutter#183132) 2026-03-02 [email protected] Roll Skia from e180358b7a7a to f886711f180d (2 revisions) (flutter/flutter#183130) 2026-03-02 [email protected] Merge changelog from 3.41.3. (flutter/flutter#183131) 2026-03-02 [email protected] Make TextDecoration final and unify maskValue across platforms (flutter/flutter#183070) 2026-03-02 [email protected] Roll pub packages (flutter/flutter#182640) 2026-03-02 [email protected] Enable SwiftPM by default on master and beta (flutter/flutter#182923) 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 Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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: ...
This PR turns SwiftPM on by default. This will opt users into SwiftPM and auto-migrate their project if it hasn't already been migrated. Users can still opt-out using these instructions: https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers#how-to-turn-off-swift-package-manager Fixes flutter#151567. Validated a bunch of non-presubmit test: - [x] [Mac flavors_test_macos](https://ci.chromium.org/b/8688777896504775697) - [x] [Mac integration_ui_test_test_macos](https://ci.chromium.org/b/8688777776881743345) - [x] [Mac platform_channel_sample_test_macos](https://ci.chromium.org/b/8688777747514736049) - [x] [Mac native_assets_ios_simulator](https://ci.chromium.org/b/8688773882663309793) - [x] [Mac_arm64 build_ios_framework_module_test](https://ci.chromium.org/b/8688777538801602449) - [x] [Mac_arm64 build_tests_1_4](https://ci.chromium.org/b/8688777432424952049) - [x] [Mac_arm64 plugin_lint_mac](https://ci.chromium.org/b/8688771010490841873) - [x] [Mac_arm64 hot_mode_dev_cycle_macos_target__benchmark](https://ci.chromium.org/b/8688777338792293857) - [x] [Mac_arm64 ios_app_with_extensions_test](https://ci.chromium.org/b/8688777319802762593) - [x] [Mac_arm64 macos_chrome_dev_mode](https://ci.chromium.org/b/8688777273798323777) - [x] [Mac_arm64 run_release_test_macos](https://ci.chromium.org/b/8688777255514805665) - [x] [Mac_arm64 mac_desktop_impeller](https://ci.chromium.org/b/8688775259036455505) - [x] [Mac_benchmark animated_complex_opacity_perf_macos__e2e_summary](https://ci.chromium.org/b/8688775233497234865) - [x] [Mac_benchmark basic_material_app_macos__compile](https://ci.chromium.org/b/8688775212414596785) - [x] [Mac_benchmark complex_layout_macos__start_up](https://ci.chromium.org/b/8688775198181888337) - [x] [Mac_benchmark complex_layout_scroll_perf_macos__timeline_summary](https://ci.chromium.org/b/8688773850790996993) - [x] [Mac_benchmark flutter_gallery_macos__compile](https://ci.chromium.org/b/8688773826409129377) - [x] [Mac_benchmark flutter_view_macos__start_up](https://ci.chromium.org/b/8688773773112767985) - [x] [Mac_benchmark hello_world_macos__compile](https://ci.chromium.org/b/8688773760727269169) - [x] [Mac_benchmark platform_view_macos__start_up](https://ci.chromium.org/b/8688773747621428417) - [x] [Mac_benchmark flutter_tool_startup__macos](https://ci.chromium.org/b/8688773787344192513) - [x] [Mac_x64 build_tests_1_4](https://ci.chromium.org/b/8688777231345770529) - [x] [Mac_x64 build_tests_2_4](https://ci.chromium.org/b/8688777216497738385) - [x] [Mac_x64 build_tests_3_4](https://ci.chromium.org/b/8688777202214369297) - [x] [Mac_x64 build_tests_4_4](https://ci.chromium.org/b/8688777185647496737) - [x] [Mac_x64 ios_app_with_extensions_test](https://ci.chromium.org/b/8688774621940143137) - [x] [Mac_x64 macos_chrome_dev_mode](https://ci.chromium.org/b/8688774597462648785) - [x] [Mac_ios animated_advanced_blend_perf_ios__timeline_summary](https://ci.chromium.org/b/8688777094221131537) - [x] [Mac_ios rrect_blur_perf_ios__timeline_summary](https://ci.chromium.org/b/8688777064000087553) - [x] [Mac_ios draw_arcs_all_fill_styles_perf_ios__timeline_summary](https://ci.chromium.org/b/8688777041025200385) - [x] [Mac_ios draw_arcs_all_stroke_styles_perf_ios__timeline_summary](https://ci.chromium.org/b/8688775537970255681) - [x] [Mac_ios draw_vertices_perf_ios__timeline_summary](https://ci.chromium.org/b/8688775520935099585) - [x] [Mac_ios draw_atlas_perf_ios__timeline_summary](https://ci.chromium.org/b/8688775504958221105) - [x] [Mac_ios static_path_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688774736260046321) - [x] [Mac_ios dynamic_path_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688774713031979665) - [x] [Mac_ios static_path_stroke_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688774695482874273) - [x] [Mac_ios dynamic_path_stroke_tessellation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773629669853585) - [x] [Mac_ios animation_with_microtasks_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773601089597473) - [x] [Mac_ios backdrop_filter_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773584942724897) - [x] [Mac_ios channels_integration_test_ios](https://ci.chromium.org/b/8688773571254087873) - [x] Mac_ios complex_layout_scroll_perf_ios__timeline_summary - [x] [Mac_ios color_filter_and_fade_perf_ios__e2e_summary](https://ci.chromium.org/b/8688773166210725681) - [x] [Mac_ios imagefiltered_transform_animation_perf_ios__timeline_summary](https://ci.chromium.org/b/8688773151009869025) - [x] [Mac_ios external_ui_integration_test_ios](https://ci.chromium.org/b/8688773134565476161) - [x] Mac_ios route_test_ios - [ ] [Mac_ios flavors_test_ios](https://ci.chromium.org/b/8688769248121472465) - [x] Mac_ios flutter_gallery_ios__start_up - [x] Mac_ios flutter_view_ios__start_up - [x] Mac_ios integration_ui_ios_keyboard_resize - [x] [Mac_ios ios_defines_test](https://ci.chromium.org/b/8688774071442762129) - [x] Mac_ios ios_platform_view_tests - [x] [Mac_ios large_image_changer_perf_ios](https://ci.chromium.org/b/8688774031240051537) - [x] [Mac_ios microbenchmarks_ios](https://ci.chromium.org/b/8688774547634994785) - [x] Mac_ios native_assets_ios - [x] [Mac_ios new_gallery_skia_ios__transition_perf](https://ci.chromium.org/b/8688776417509425425) - [x] [Mac_ios platform_channel_sample_test_ios](https://ci.chromium.org/b/8688772159495774417) - [x] Mac_ios platform_channels_benchmarks_ios - [x] [Mac_ios platform_interaction_test_ios](https://ci.chromium.org/b/8688772132549031473) - [x] Mac_ios platform_view_ios__start_up - [x] [Mac_ios platform_views_scroll_perf_ios__timeline_summary](https://ci.chromium.org/b/8688770924854937297) - [x] [Mac_ios platform_views_scroll_perf_ad_banners__timeline_summary](https://ci.chromium.org/b/8688770911202009137) - [x] [Mac_ios platform_views_scroll_perf_bottom_ad_banner__timeline_summary](https://ci.chromium.org/b/8688770895354090081) - [x] [Mac_ios platform_views_scroll_perf_non_intersecting_impeller_ios__timeline_summary](https://ci.chromium.org/b/8688770878784490225) - [x] [Mac_ios post_backdrop_filter_perf_ios__timeline_summary](https://ci.chromium.org/b/8688770864215965681) - [x] [Mac_ios wide_gamut_ios](https://ci.chromium.org/b/8688772092281083761) - [x] [Mac_ios ios_debug_workflow](https://ci.chromium.org/b/8688773991399243601) - [x] Mac_ios very_long_picture_scrolling_perf_ios__e2e_summary - [x] Mac_ios spell_check_test - [x] [Mac_x64_ios integration_test_test_ios](https://ci.chromium.org/b/8688772067540844481) - [x] [Mac_x64_ios hot_mode_dev_cycle_ios__benchmark](https://ci.chromium.org/b/8688772048988479185) - [x] [Mac_arm64_ios basic_material_app_ios__compile](https://ci.chromium.org/b/8688772023490349601) - [x] [Mac_arm64_ios flutter_gallery_ios__compile](https://ci.chromium.org/b/8688772011072284625) - [x] [Mac_arm64_ios hello_world_ios__compile](https://ci.chromium.org/b/8688771998203648913) - [x] [Mac_arm64_ios imitation_game_flutter](https://ci.chromium.org/b/8688771982414426593) - [x] [Mac_arm64_ios imitation_game_swiftui](https://ci.chromium.org/b/8688771968308027601) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This PR turns SwiftPM on by default. This will opt users into SwiftPM and auto-migrate their project if it hasn't already been migrated. Users can still opt-out using these instructions: https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers#how-to-turn-off-swift-package-manager
Fixes #151567.
Validated a bunch of non-presubmit test:
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot 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.