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] Add support for SPM #6672

Merged
merged 11 commits into from
May 6, 2024

Conversation

stuartmorgan
Copy link
Contributor

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.

Fixes flutter/flutter#146903

Pre-launch Checklist

@flutter-dashboard
Copy link

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
Copy link
Contributor Author

stuartmorgan commented May 6, 2024

test-exempt: code refactor with no semantic change

(New SPM support is automatically exercised by existing CI)

Co-authored-by: Victoria Ashworth <15619084+vashworth@users.noreply.github.com>
@@ -3,8 +3,9 @@
// found in the LICENSE file.

#import "FFSFileSelectorPlugin.h"

#import "./include/file_selector_ios/messages.g.h"
Copy link
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
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
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
Contributor Author

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.

Co-authored-by: Victoria Ashworth <15619084+vashworth@users.noreply.github.com>
Copy link
Contributor

@vashworth vashworth 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 stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label May 6, 2024
@auto-submit auto-submit bot merged commit 45a4573 into flutter:main May 6, 2024
78 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 7, 2024
auto-submit bot 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.

Fixes flutter/flutter#146903
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 platform-ios platform-macos
Projects
None yet
3 participants