Skip to content
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

[file_selector_ios, image_picker_ios] Remove Swift Package Support #6740

Conversation

vashworth
Copy link
Contributor

@vashworth vashworth commented May 15, 2024

Plugins converted to Swift Package Manager that use a modulemap seem to be having issues with there being a module.modulemap. As a temporary solution to unblock people, we'll remove the module.modulemap and Swift Package support (Package.swift).

Temporary solution for flutter/flutter#148307.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@vashworth vashworth marked this pull request as ready for review May 15, 2024 18:18
@vashworth vashworth requested review from stuartmorgan and removed request for jmagman May 15, 2024 18:18
Copy link
Member

@loic-sharma loic-sharma 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
Copy link
Contributor

Do we have any idea yet why we don't see this in CI? We can land this as is, but it would be nice to have a test that we can ensure we'd don't regress later when re-landing support.

@@ -1,3 +1,7 @@
## 0.5.2+1

* Removes Swift Package Manager compatibility.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about "Temporarily remove Swift Package Manager compatibility to resolve issues with Cocoapods builds."?

@vashworth
Copy link
Contributor Author

vashworth commented May 15, 2024

Do we have any idea yet why we don't see this in CI? We can land this as is, but it would be nice to have a test that we can ensure we'd don't regress later when re-landing support.

So far, seems to be older versions of Xcode are having this issue and we don't enforce Xcode 15 yet. So unfortunately impossible to test in CI since macOS 13 does not support Xcode 14 or lower. I misspoke, technically I think macOS 13 does support Xcode 14 (it's macOS 14 that doesn't). We could have duplicate tests and have them run on Xcode 14, but that's probably not worth the capacity it would take.

I'll add an issue to reland this and when they do, to temporarily test with Xcode 14

@stuartmorgan
Copy link
Contributor

Have we actually validated that it's an Xcode 14 vs 15 thing? I thought that was still speculative based on the issue discussion (i.e., nobody seems to have indicated confirming that the same project works in 15 but not 14).

@vashworth
Copy link
Contributor Author

Have we actually validated that it's an Xcode 14 vs 15 thing? I thought that was still speculative based on the issue discussion (i.e., nobody seems to have indicated confirming that the same project works in 15 but not 14).

I confirmed Xcode 14 breaks: https://ci.chromium.org/ui/p/flutter/builders/try.shadow/Mac_x64%20ios_build_all_packages%20master/484/overview

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label May 15, 2024
@jmagman
Copy link
Member

jmagman commented May 15, 2024

I think we can get rid of the manual modulemaps, that was a lot of work to explicit module Test working. We could just do the cheap thing and redeclare the methods we need in the tests.

@vashworth
Copy link
Contributor Author

I think we can get rid of the manual modulemaps, that was a lot of work to explicit module Test working. We could just do the cheap thing and redeclare the methods we need in the tests.

Unfortunately, we're not the only ones that do this, though. I've seen other plugin authors copy our model to achieve the same. I would think we would want to provide a way for them to maintain it, but yeah the modulemaps are super annoying and I wish we could get rid of them. I'll think on it more.

Example: https://github.com/Baseflow/flutter-geolocator/blob/ca5469fe4212fe82d586bed93634d5e5a0e6154a/geolocator_apple/ios/Classes/GeolocatorPlugin.modulemap#L24

@stuartmorgan
Copy link
Contributor

Have we considered cherry picking an Xcode 15 requirement to 3.22?

@vashworth
Copy link
Contributor Author

Have we considered cherry picking an Xcode 15 requirement to 3.22?

We could, but this issue isn't the only problem we're having with the double modulemaps. @loic-sharma also ran into an issue when trying to convert camera_avfoundation: https://gist.github.com/loic-sharma/27bd8e3ea0d9ab16cd4b8de03918ec4d

So I think we need to figure out a better way to handle modulemaps

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 17, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 17, 2024
flutter/packages@87a02e3...ae4dd32

2024-05-17 engine-flutter-autoroll@skia.org Roll Flutter from 0d22d91 to 00425ef (14 revisions) (flutter/packages#6753)
2024-05-16 32538273+ValentinVignal@users.noreply.github.com [go_router_builder] Add test for `onExit` (flutter/packages#6614)
2024-05-16 32666446+hamdikahloun@users.noreply.github.com [camera_android_camerax] update to latest stable camerax 1.3.3 (flutter/packages#6737)
2024-05-16 magder@google.com [camera_avfoundation] Revert camera example PRODUCT_BUNDLE_IDENTIFIER (flutter/packages#6735)
2024-05-16 15619084+vashworth@users.noreply.github.com [file_selector_ios, image_picker_ios] Remove Swift Package Support (flutter/packages#6740)
2024-05-16 katelovett@google.com [two_dimensional_scrollables] TreeView (flutter/packages#6592)
2024-05-16 engine-flutter-autoroll@skia.org Roll Flutter from 39651e8 to 0d22d91 (23 revisions) (flutter/packages#6748)
2024-05-16 byoungchan.lee@gmx.com [pigeon][swift] Removes FlutterError in favor of PigeonError (flutter/packages#6611)
2024-05-16 15619084+vashworth@users.noreply.github.com [webview_flutter] Skip "Video playback policy" drive tests (flutter/packages#6747)

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,rmistry@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
TecHaxter pushed a commit to TecHaxter/flutter_packages that referenced this pull request May 22, 2024
…lutter#6740)

Plugins converted to Swift Package Manager that use a modulemap seem to be having issues with there being a `module.modulemap`. As a temporary solution to unblock people, we'll remove the `module.modulemap` and Swift Package support (`Package.swift`). 

Temporary solution for flutter/flutter#148307.
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 p: file_selector p: image_picker platform-ios
Projects
None yet
4 participants