-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift #161464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
auto-submit
merged 1 commit into
flutter:master
from
loic-sharma:spm_app_module_postsubmit_fix
Jan 14, 2025
Merged
[SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift #161464
auto-submit
merged 1 commit into
flutter:master
from
loic-sharma:spm_app_module_postsubmit_fix
Jan 14, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9563961 to
580d298
Compare
vashworth
approved these changes
Jan 14, 2025
Contributor
vashworth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
9 tasks
maheshj01
pushed a commit
to maheshj01/flutter
that referenced
this pull request
Jan 15, 2025
…e.swift (flutter#161464) <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> ### Background Flutter generates a `Package.swift` file that contains the plugins that should be built using SwiftPM. Since Flutter does not support Swift Package Manager in add-to-app scenarios yet, Flutter uses CocoaPods to build plugins if you call `flutter build ios-framework`. To ensure `pod install` is rerun, the tool deleted the `Package.swift` file. Unfortunately, deleting the `Package.swift` file causes the Xcode project to no longer build if it has SwiftPM integration. This caused the [`build_ios_framework_module_test` to fail when SwiftPM was turned on by default](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac%20build_ios_framework_module_test/21807/overview). ### Fix Instead of deleting the `Package.swift` file, we instead generate a `Package.swift` file with no dependencies. This will invalidate the fingerprint and cause `pod install` to rerun if the app had plugins that were previously built using SwiftPM. ## 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]. <!-- 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
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 15, 2025
This was referenced Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
This was referenced Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
This was referenced Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 16, 2025
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Jan 16, 2025
flutter/flutter@40c2b86...5517cc9 2025-01-15 [email protected] feat: Change default value of keyboardDismissBehavior (flutter/flutter#158580) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161680) 2025-01-15 [email protected] Revert "Autocomplete Options Width" (flutter/flutter#161666) 2025-01-15 [email protected] Update two_dimensional_scrollables triage routing (flutter/flutter#161667) 2025-01-15 [email protected] [DisplayList] Migrate from SkRSXform to Impeller RSTransform (flutter/flutter#161652) 2025-01-15 [email protected] Roll Packages from d1fd623 to f73cb00 (2 revisions) (flutter/flutter#161672) 2025-01-15 [email protected] Fix DropdownMenu isCollapsed decoration does not Reduce height (flutter/flutter#161427) 2025-01-15 [email protected] Manual roll of Skia to e7b8d078851f (flutter/flutter#161609) 2025-01-15 [email protected] Fix `TabBar` glitchy elastic `Tab` animation (flutter/flutter#161514) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161643) 2025-01-15 [email protected] Exclude the top-level `engine` directory from `generate_gradle_lockfiles`. (flutter/flutter#161635) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161632) 2025-01-15 [email protected] Refactor `android_engine_test`, make it easier to debug/deflake locally. (flutter/flutter#161534) 2025-01-15 [email protected] [Impeller] null check device buffer in image encoding. (flutter/flutter#161194) 2025-01-15 [email protected] Feature/twitter keyboard (flutter/flutter#161025) 2025-01-15 [email protected] Fixed XiaoMi statusBar Bug (flutter/flutter#161271) 2025-01-15 [email protected] Clean up engine's analysis_options.yaml (flutter/flutter#161554) 2025-01-14 [email protected] Remove `gradle_deprecated_settings` test app, and remove reference from lockfile exclusion yaml (flutter/flutter#161622) 2025-01-14 [email protected] [deps] remove no-longer-used repo deps (flutter/flutter#161605) 2025-01-14 [email protected] [DisplayList] remove obsolete use of Skia goemetry objects in DL utils (flutter/flutter#161553) 2025-01-14 [email protected] [Engine] Support asymmetrical rounded superellipses (flutter/flutter#161409) 2025-01-14 [email protected] [SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift (flutter/flutter#161464) 2025-01-14 [email protected] [canvaskit] Fix GIF decode failure (flutter/flutter#161536) 2025-01-14 [email protected] [Impeller] fixes for AHB swapchains. (flutter/flutter#161562) 2025-01-14 [email protected] Last Engine<>Framework lint sync (flutter/flutter#161560) 2025-01-14 [email protected] Check that localization files of stocks app are up-to-date (flutter/flutter#161608) 2025-01-14 [email protected] [Android] Actually remove dev dependencies from release builds (flutter/flutter#161343) 2025-01-14 [email protected] Update package revisions to latest (flutter/flutter#161525) 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] 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: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
9 tasks
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 12, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 6, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 7, 2025
androidseb
pushed a commit
to androidseb/packages
that referenced
this pull request
Jun 8, 2025
flutter/flutter@40c2b86...5517cc9 2025-01-15 [email protected] feat: Change default value of keyboardDismissBehavior (flutter/flutter#158580) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161680) 2025-01-15 [email protected] Revert "Autocomplete Options Width" (flutter/flutter#161666) 2025-01-15 [email protected] Update two_dimensional_scrollables triage routing (flutter/flutter#161667) 2025-01-15 [email protected] [DisplayList] Migrate from SkRSXform to Impeller RSTransform (flutter/flutter#161652) 2025-01-15 [email protected] Roll Packages from d1fd623 to f73cb00 (2 revisions) (flutter/flutter#161672) 2025-01-15 [email protected] Fix DropdownMenu isCollapsed decoration does not Reduce height (flutter/flutter#161427) 2025-01-15 [email protected] Manual roll of Skia to e7b8d078851f (flutter/flutter#161609) 2025-01-15 [email protected] Fix `TabBar` glitchy elastic `Tab` animation (flutter/flutter#161514) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161643) 2025-01-15 [email protected] Exclude the top-level `engine` directory from `generate_gradle_lockfiles`. (flutter/flutter#161635) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161632) 2025-01-15 [email protected] Refactor `android_engine_test`, make it easier to debug/deflake locally. (flutter/flutter#161534) 2025-01-15 [email protected] [Impeller] null check device buffer in image encoding. (flutter/flutter#161194) 2025-01-15 [email protected] Feature/twitter keyboard (flutter/flutter#161025) 2025-01-15 [email protected] Fixed XiaoMi statusBar Bug (flutter/flutter#161271) 2025-01-15 [email protected] Clean up engine's analysis_options.yaml (flutter/flutter#161554) 2025-01-14 [email protected] Remove `gradle_deprecated_settings` test app, and remove reference from lockfile exclusion yaml (flutter/flutter#161622) 2025-01-14 [email protected] [deps] remove no-longer-used repo deps (flutter/flutter#161605) 2025-01-14 [email protected] [DisplayList] remove obsolete use of Skia goemetry objects in DL utils (flutter/flutter#161553) 2025-01-14 [email protected] [Engine] Support asymmetrical rounded superellipses (flutter/flutter#161409) 2025-01-14 [email protected] [SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift (flutter/flutter#161464) 2025-01-14 [email protected] [canvaskit] Fix GIF decode failure (flutter/flutter#161536) 2025-01-14 [email protected] [Impeller] fixes for AHB swapchains. (flutter/flutter#161562) 2025-01-14 [email protected] Last Engine<>Framework lint sync (flutter/flutter#161560) 2025-01-14 [email protected] Check that localization files of stocks app are up-to-date (flutter/flutter#161608) 2025-01-14 [email protected] [Android] Actually remove dev dependencies from release builds (flutter/flutter#161343) 2025-01-14 [email protected] Update package revisions to latest (flutter/flutter#161525) 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] 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: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
FMorschel
pushed a commit
to FMorschel/packages
that referenced
this pull request
Jun 9, 2025
flutter/flutter@40c2b86...5517cc9 2025-01-15 [email protected] feat: Change default value of keyboardDismissBehavior (flutter/flutter#158580) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161680) 2025-01-15 [email protected] Revert "Autocomplete Options Width" (flutter/flutter#161666) 2025-01-15 [email protected] Update two_dimensional_scrollables triage routing (flutter/flutter#161667) 2025-01-15 [email protected] [DisplayList] Migrate from SkRSXform to Impeller RSTransform (flutter/flutter#161652) 2025-01-15 [email protected] Roll Packages from d1fd623 to f73cb00 (2 revisions) (flutter/flutter#161672) 2025-01-15 [email protected] Fix DropdownMenu isCollapsed decoration does not Reduce height (flutter/flutter#161427) 2025-01-15 [email protected] Manual roll of Skia to e7b8d078851f (flutter/flutter#161609) 2025-01-15 [email protected] Fix `TabBar` glitchy elastic `Tab` animation (flutter/flutter#161514) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161643) 2025-01-15 [email protected] Exclude the top-level `engine` directory from `generate_gradle_lockfiles`. (flutter/flutter#161635) 2025-01-15 [email protected] Roll pub packages (flutter/flutter#161632) 2025-01-15 [email protected] Refactor `android_engine_test`, make it easier to debug/deflake locally. (flutter/flutter#161534) 2025-01-15 [email protected] [Impeller] null check device buffer in image encoding. (flutter/flutter#161194) 2025-01-15 [email protected] Feature/twitter keyboard (flutter/flutter#161025) 2025-01-15 [email protected] Fixed XiaoMi statusBar Bug (flutter/flutter#161271) 2025-01-15 [email protected] Clean up engine's analysis_options.yaml (flutter/flutter#161554) 2025-01-14 [email protected] Remove `gradle_deprecated_settings` test app, and remove reference from lockfile exclusion yaml (flutter/flutter#161622) 2025-01-14 [email protected] [deps] remove no-longer-used repo deps (flutter/flutter#161605) 2025-01-14 [email protected] [DisplayList] remove obsolete use of Skia goemetry objects in DL utils (flutter/flutter#161553) 2025-01-14 [email protected] [Engine] Support asymmetrical rounded superellipses (flutter/flutter#161409) 2025-01-14 [email protected] [SwiftPM] Make 'flutter build ios-framework' generate an empty Package.swift (flutter/flutter#161464) 2025-01-14 [email protected] [canvaskit] Fix GIF decode failure (flutter/flutter#161536) 2025-01-14 [email protected] [Impeller] fixes for AHB swapchains. (flutter/flutter#161562) 2025-01-14 [email protected] Last Engine<>Framework lint sync (flutter/flutter#161560) 2025-01-14 [email protected] Check that localization files of stocks app are up-to-date (flutter/flutter#161608) 2025-01-14 [email protected] [Android] Actually remove dev dependencies from release builds (flutter/flutter#161343) 2025-01-14 [email protected] Update package revisions to latest (flutter/flutter#161525) 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] 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: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Flutter generates a
Package.swiftfile that contains the plugins that should be built using SwiftPM.Since Flutter does not support Swift Package Manager in add-to-app scenarios yet, Flutter uses CocoaPods to build plugins if you call
flutter build ios-framework. To ensurepod installis rerun, the tool deleted thePackage.swiftfile.Unfortunately, deleting the
Package.swiftfile causes the Xcode project to no longer build if it has SwiftPM integration. This caused thebuild_ios_framework_module_testto fail when SwiftPM was turned on by default.Fix
Instead of deleting the
Package.swiftfile, we instead generate aPackage.swiftfile with no dependencies. This will invalidate the fingerprint and causepod installto rerun if the app had plugins that were previously built using SwiftPM.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.