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

[flutter_tools] update pubspec .yaml message should not be displayed when creating a new plugin #62599

Merged
merged 5 commits into from
Jul 30, 2020

Conversation

cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Jul 30, 2020

Description

Fix a bug where the update pubspec.yaml message always display even when creating a new plugin.

Related Issues

fixes #62594

Tests

flutter create -t plugin in an empty folder should not show pubspec.yaml updating suggestion
flutter create -t plugin in an existing plugin should show pubspec.yaml updating suggestion

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 30, 2020
@cyanglaz cyanglaz requested a review from jmagman July 30, 2020 19:09
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

LGTM with nit

@@ -36,6 +37,7 @@ final Generator _kNoColorTerminalPlatform = () => FakePlatform.fromPlatform(cons
final Map<Type, Generator> noColorTerminalOverride = <Type, Generator>{
Platform: _kNoColorTerminalPlatform,
};
final BufferLogger logger = BufferLogger.test();
Copy link
Member

Choose a reason for hiding this comment

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

Add this in main() under `LoggingProcessManager loggingProcessManager;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -49,6 +49,7 @@ void main() {
Directory projectDir;
FlutterVersion mockFlutterVersion;
LoggingProcessManager loggingProcessManager;
BufferLogger logger = BufferLogger.test();
Copy link
Member

@jmagman jmagman Jul 30, 2020

Choose a reason for hiding this comment

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

Sorry, I also meant because logger = BufferLogger.test() is in setUp, match the pattern of LoggingProcessManager and just declare it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I did that and forgot the remove the other constructor call. Fixed in a new commit.

@@ -49,6 +49,7 @@ void main() {
Directory projectDir;
FlutterVersion mockFlutterVersion;
LoggingProcessManager loggingProcessManager;
BufferLogger logger = BufferLogger.test();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
BufferLogger logger = BufferLogger.test();
BufferLogger logger;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@zanderso zanderso merged commit 48fab86 into flutter:master Jul 30, 2020
Pragya007 pushed a commit to Pragya007/flutter that referenced this pull request Aug 11, 2020
…when creating a new plugin (flutter#62599)

* update pubspec message should not be displayed when creating a new plugin

* formatting

* revikew

* review

* cleanup
mingwandroid pushed a commit to mingwandroid/flutter that referenced this pull request Sep 6, 2020
…when creating a new plugin (flutter#62599)

* update pubspec message should not be displayed when creating a new plugin

* formatting

* revikew

* review

* cleanup
@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
5 participants