-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Detect plugins based on .flutter-plugins-dependencies; avoid refreshing twice in iOS/MacOS
#157393
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
Closed
matanlurey
wants to merge
2
commits into
flutter:master
from
matanlurey:flutter-plugins-deps-has-plugins
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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.
In #157391 (comment) I said
This was true, but I think the logic added in that PR was intended to
forceCocoaPodsOnlyfor add-to-app, since add-to-app currently only supports CocoaPods and not Swift Package Manager.flutter/packages/flutter_tools/lib/src/commands/build_ios_framework.dart
Lines 263 to 268 in 7504abc
flutter/packages/flutter_tools/lib/src/flutter_plugins.dart
Line 207 in 7504abc
However,
build_ios_framework_module_test(post-submit only test) would test this, so I checked this out, setflutter config --enable-swift-package-manager, and it still passed. Which makes sense because thatproject.usesSwiftPackageManagerexplicitly checks if it's an add-to-app module (!isModule).flutter/packages/flutter_tools/lib/src/project.dart
Lines 269 to 272 in 7504abc
All that to say, I still think this isn't needed, but not for the reason I said before.
@loic-sharma can you check my work here?
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.
...and I just remembered that command can be run from a normal
flutter created iOS or macOS app, not just a module.On this PR:
On master that directory contains camera_avfoundation.xcframework, but on this PR it doesn't.
.flutter-plugins-dependenciesshould haveswift_package_manager_enabledfalse at this point.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.
@loic-sharma this would be a good integration test to add.
Uh oh!
There was an error while loading. Please reload this page.
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.
The
flutter build ios-frameworkcommand acts unexpectedly on a non-module project if Swift Package Manager is enabled. If I do this:The build completes, however, this unexpectedly generates a Swift package manifest that includes plugins and then later deletes it.
Interestingly, the produced
App.xframeworkdoesn't seem to statically link against the plugins?I'll need to dig into this more
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.
Sounds good, thanks for looking at this!
I am not explicitly blocked, but I would like to know (can be tomorrow) if I should expect to pursue this change (that is, it should be OK if other bugs or considerations are fixed) or if I should expect to drop it (in which case I might want to just opt-out all users of
processPodsIfNeededfrom generating.flutter-plugins: #157393 (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.
I suspect you should drop this for now and reassign to me. I should clean this up as part of adding add-to-app support to SwiftPM. Thoughts @jmagman?