Skip to content

Conversation

@franciscojma86
Copy link
Contributor

Description

Creates a .flutter-plugins and a .flutter-plugins-dependencies file for each platform project instead of in the Flutter root project for all platforms except for Android.

Related Issues

#46618

Tests

Tests remaining

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].

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 17, 2019
@fluttergithubbot
Copy link
Contributor

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 Hixie.

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

@franciscojma86 franciscojma86 removed the request for review from jmagman December 17, 2019 23:01
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods = parse_KV_file('./Flutter/.flutter-plugins')
Copy link
Member

Choose a reason for hiding this comment

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

The Podfiles aren't owned by Flutter, and they get generated only when the app is created. So existing Podfiles are going to expect '../.flutter-plugins' and won't get this change without a migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I am still generating the current file at the same location to avoid breaking existing apps. I'll add a warning message if they are using the "old" podfile so the user can delete it and auto-generate it again.

Copy link
Member

@jmagman jmagman Jan 2, 2020

Choose a reason for hiding this comment

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

Can you copy/make the symlinks in this Ruby file from the old one if the old directory is present and the new one isn't so they don't need to regenerate anything, and a pod install won't just fail? The unless block right above is doing a similar one-time cp migration

Copy link
Member

Choose a reason for hiding this comment

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

Or something like this so they know what to do if the new file doesn't exist:

plugin_file = File.join(__dir__, 'Flutter', '.flutter-plugins')
unless File.exist?(plugin_file)
  raise "Flutter/.flutter-plugins must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
plugin_pods = parse_KV_file(plugin_file)

@codecov
Copy link

codecov bot commented Jan 7, 2020

Codecov Report

Merging #47258 into master will increase coverage by 1.17%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #47258      +/-   ##
==========================================
+ Coverage   63.03%    64.2%   +1.17%     
==========================================
  Files         204      205       +1     
  Lines       20919    20777     -142     
==========================================
+ Hits        13186    13340     +154     
+ Misses       7733     7437     -296
Flag Coverage Δ
#flutter_tool 64.2% <0%> (+1.17%) ⬆️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/desktop_device.dart 19.23% <0%> (-48.08%) ⬇️
...utter_tools/lib/src/build_runner/build_script.dart 0% <0%> (-38.19%) ⬇️
packages/flutter_tools/lib/src/base/config.dart 79.16% <0%> (-16.49%) ⬇️
...ckages/flutter_tools/lib/src/base/async_guard.dart 83.33% <0%> (-11.12%) ⬇️
...utter_tools/lib/src/reporting/github_template.dart 78.43% <0%> (-10.04%) ⬇️
...er_tools/lib/src/commands/build_ios_framework.dart 6.52% <0%> (-5.05%) ⬇️
packages/flutter_tools/lib/src/context_runner.dart 70.68% <0%> (-1.73%) ⬇️
packages/flutter_tools/lib/src/device.dart 65.92% <0%> (-1.12%) ⬇️
packages/flutter_tools/lib/src/web/compile.dart 68.75% <0%> (-0.95%) ⬇️
...tools/lib/src/base/error_handling_file_system.dart 87.3% <0%> (-0.94%) ⬇️
... and 97 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 134c2ff...17e113e. Read the comment docs.

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels Jan 7, 2020
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Jan 7, 2020
@franciscojma86 franciscojma86 removed the request for review from christopherfujino January 8, 2020 00:51
@jmagman
Copy link
Member

jmagman commented Jan 8, 2020

Re: "get fetches packages and injects plugin" failure:

C:\Users\ContainerAdministrator\AppData\Local\Temp\flutter_tools_packages_test.23547105-31a1-11ea-aad5-d9e98a4a8e96\flutter_project/.ios/Podfile should exist, but does not

in _regenerateFromTemplateIfNeeded it's returning immediately instead of copying over everything from the template. toolingChanged and pubspecChanged are both false on this change at that point, but true on master.

@franciscojma86
Copy link
Contributor Author

Closing in favor of #49085. The changes to the templates will be done in a separate PR

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 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.

5 participants