Skip to content

[file_selector] Add support for SPM - #6672

Merged
auto-submit[bot] merged 11 commits into
flutter:mainfrom
stuartmorgan-g:file-selector-spm
May 6, 2024
Merged

[file_selector] Add support for SPM#6672
auto-submit[bot] merged 11 commits into
flutter:mainfrom
stuartmorgan-g:file-selector-spm

Conversation

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Adjusts the structure of the iOS and macOS implementations to match SPM layout conventions, adds the SPM package specifications, and updates the podspecs to reflect the new paths to keep compatibility with Cocoapods.

Does not include any Xcode project updates, in order to preserve compatibility with stable.

Fixesflutter/flutter#146903

Pre-launch Checklist

@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@stuartmorgan-g

stuartmorgan-g commented May 6, 2024

Copy link
Copy Markdown
CollaboratorAuthor

test-exempt: code refactor with no semantic change

(New SPM support is automatically exercised by existing CI)

Comment threadpackages/file_selector/file_selector_ios/pigeons/messages.dart Outdated
Co-authored-by: Victoria Ashworth <15619084+vashworth@users.noreply.github.com>

#import "FFSFileSelectorPlugin.h"

#import "./include/file_selector_ios/messages.g.h"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was adding the relative path to the #import necessary, if it's in the header search path?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So for most of the headers, include paths is sufficient. However, messages.g.h is a problem when there's multiple plugins that also have a messages.g.h. Seems like it can't resolve which to use. This appeared to also be a problem with CocoaPods, more context here: flutter/flutter#147587 (comment)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this instead wait until #6600 is done then?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

I'm fine with manually doing include path fixup in advance of the fix landing, since we know the generator will catch up with it and it's not changing anything that could have runtime effects.

Comment threadpackages/file_selector/file_selector_ios/pigeons/messages.dart Outdated
Co-authored-by: Victoria Ashworth <15619084+vashworth@users.noreply.github.com>

@vashworthvashworth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@stuartmorgan-gstuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label May 6, 2024
@auto-submit
auto-submitBot merged commit 45a4573 into flutter:mainMay 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 7, 2024
auto-submitBot pushed a commit to flutter/flutter that referenced this pull request May 7, 2024
flutter/packages@2dfe645...5ccddfc
2024-05-06 15619084+vashworth@users.noreply.github.com [shared_preferences_foundation] Adds Swift Package Manager compatibility (flutter/packages#6640)
2024-05-06 stuartmorgan@google.com [file_selector] Add support for SPM (flutter/packages#6672)
2024-05-06 43054281+camsim99@users.noreply.github.com [camerax] Add empty implementation for `prepareForVideoRecording` not used on Android (flutter/packages#6676)
2024-05-06 stuartmorgan@google.com [ci] Reduce the number of tasks in recipe CQ (flutter/packages#6673)
2024-05-06 engine-flutter-autoroll@skia.org Roll Flutter from f1037a0 to 04424e1 (25 revisions) (flutter/packages#6674)
2024-05-06 43054281+camsim99@users.noreply.github.com [camerax] Prevent using unsupported concurrent camera use cases (flutter/packages#6608)
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
Adjusts the structure of the iOS and macOS implementations to match SPM layout conventions, adds the SPM package specifications, and updates the podspecs to reflect the new paths to keep compatibility with Cocoapods.
Does not include any Xcode project updates, in order to preserve compatibility with stable.
Fixesflutter/flutter#146903
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
Adjusts the structure of the iOS and macOS implementations to match SPM layout conventions, adds the SPM package specifications, and updates the podspecs to reflect the new paths to keep compatibility with Cocoapods.
Does not include any Xcode project updates, in order to preserve compatibility with stable.
Fixesflutter/flutter#146903
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
Adjusts the structure of the iOS and macOS implementations to match SPM layout conventions, adds the SPM package specifications, and updates the podspecs to reflect the new paths to keep compatibility with Cocoapods.
Does not include any Xcode project updates, in order to preserve compatibility with stable.
Fixesflutter/flutter#146903
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit Appp: file_selectorplatform-iosplatform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[file_selector] Add Swift Package Manager compatibility to file_selector_ios and file_selector_macos

3 participants

@stuartmorgan-g@jmagman@vashworth