Skip to content

Conversation

@cyanglaz
Copy link
Contributor

Description

Removes the no-op iOS folder in newly created plugin.
Also sets the newly created plugin's min flutter version to 1.20.0. (I haven't added this change to this PR, so the tests can pass)

This PR is for reviewing purpose. We will try to land this as a hot-fix when 1.20.0 is released.

TODO: update min flutter sdk constraint to 1.20.0

Related Issues

#60215

Tests

plugin does not support any platform by default is updated to reflect the change.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 15, 2020
@cyanglaz cyanglaz requested a review from jonahwilliams July 15, 2020 17:56
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@csells
Copy link
Contributor

csells commented Jul 15, 2020

@pcsosinski fyi

@jmagman
Copy link
Member

jmagman commented Jul 23, 2020

Won't this prevent Flutter app developers on current stable from using these plugins? Is there any harm to leaving this dummy directory until the majority of Flutter users have upgraded past #59209?
Add-to-app still hasn't been migrated #61269

@cyanglaz
Copy link
Contributor Author

I don't see any technical harm other than people might get confused with the no-op iOS folders. What do you think of pushing this change (along with the new flutter create plugin command to the next stable? @csells

@zanderso
Copy link
Member

@cyanglaz Could you give a little more color on the response to @jmagman's questions? I'm also curious about what the impact will be particularly around the question of users of the current stable. Has anyone tried this specific case? Will there be tool crashes?

@csells
Copy link
Contributor

csells commented Jul 27, 2020

the reason for this change is that this release marks the first time we've updated the client-side pub tool to disable the use of the old pubspec.yaml. the new pubspec format requires a pluging to be explicit about what platforms it supports. we can hardly ask them to do that and then require them to leave in an empty ios folder, too, regardless of whether they're targeting ios.

@jonahwilliams
Copy link
Contributor

We can't break add2app

@zanderso
Copy link
Member

@csells That makes sense. My concern is more around the stability/crashiness of the tool around this change. We might not have good test coverage in this area, so some manual testing might be needed for the scenario that @jmagman is worried about. Just want to get confirmation that that scenario has been tried, and the tool does not have any unexpected behavior.

@cyanglaz
Copy link
Contributor Author

cyanglaz commented Jul 27, 2020

@zanderso

For a pure flutter apps, the current stable (1.17) user will not be able to build the app if it depends on the plugin at all, because the plugin has a min flutter sdk requirement of 1.20.0.

They will see an error when they depend on a plugin created using the 1.20.0 command like:

The current Flutter SDK version is 1.17.5.                              
                                                                        
Because <app_name> depends on <plugin_name> which requires Flutter SDK version >=1.20.0 <2.0.0, version solving failed.

Note that this PR only adds the constraint to the newly created plugins.

For example, an existing web only plugin author wants to remove the no-op ios folder, they can do that by manually removing the folder and set the min sdk version to 1.20.0, which also blocks their plugin to be used by people who are on 1.17

I'm not sure about the Add to app cases that @jmagman mentioned

@jmagman
Copy link
Member

jmagman commented Jul 28, 2020

Add-to-app at least isn't fixed in 1.20. It's parsing the old .flutter-plugins and expects an ios directory:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/podhelper.rb.tmpl#L70
I don't think this would surface as a tool crash since it looks like pod install failing.
Note the empty directory may be confusing to users, but isn't related to requiring the new pubspec format for pub publishing.

@zanderso
Copy link
Member

lgtm after #61269 lands.

@jmagman
Copy link
Member

jmagman commented Jul 28, 2020

#61269 has landed.

@jmagman jmagman merged commit 004f90f into flutter:master Jul 28, 2020
jmagman pushed a commit to jmagman/flutter that referenced this pull request Jul 28, 2020
@pcsosinski
Copy link

thanks all - @cyanglaz or @jmagman can you clarify a couple things:

  • which commit(s) do we need on the 1.20 branch
  • can this land on the next beta build or does it need to land right before the 1.20.0 stable release?

@jmagman
Copy link
Member

jmagman commented Jul 28, 2020

@pcsosinski

which commit(s) do we need on the 1.20 branch

The commit needed on the 1.20 branch is #62372. That includes #61269 (with merge conflicts resolved) and this PR, #61561.

can this land on the next beta build or does it need to land right before the 1.20.0 stable release?

I think it needs to be included in the 1.20.0 stable. If a plugin says its minimum is 1.20 (the new default) and is missing the ios directory, an add-to-app iOS module on 1.20 will not be able to use that plugin even though it meets the flutter version requirements.

cyanglaz pushed a commit to cyanglaz/flutter that referenced this pull request Aug 4, 2020
cyanglaz pushed a commit that referenced this pull request Aug 4, 2020
This partially reverts cherry-pick f904f51
cyanglaz pushed a commit to cyanglaz/flutter that referenced this pull request Aug 5, 2020
cyanglaz pushed a commit to cyanglaz/flutter that referenced this pull request Aug 5, 2020
Pragya007 pushed a commit to Pragya007/flutter that referenced this pull request Aug 11, 2020
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants