-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[ Widget Preview ] Don't require 'flutter pub get' to be run in the root project #178175
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
Conversation
…oot project Using the presence of `.dart_tool` in a project to determine if it's a valid Flutter project is not correct as the directory will not exist if `flutter pub get` has not yet been run. Fixes #178052
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.
Code Review
This pull request addresses an issue where the widget preview command would fail if flutter pub get had not been run in the project. The fix correctly removes the check for the existence of the .dart_tool directory, which is not a reliable indicator of a valid Flutter project before dependencies are fetched. Additionally, the code is updated to recursively create the widget preview scaffold directory, ensuring the necessary directory structure is in place even if .dart_tool does not exist. A new regression test is included to verify that the command now succeeds in this scenario. The changes are correct and effectively resolve the issue.
jyameo
left a 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.
LGTM!
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…oot project (flutter#178175) Using the presence of `.dart_tool` in a project to determine if it's a valid Flutter project is not correct as the directory will not exist if `flutter pub get` has not yet been run. Fixes flutter#178052
…oot project (flutter#178175) Using the presence of `.dart_tool` in a project to determine if it's a valid Flutter project is not correct as the directory will not exist if `flutter pub get` has not yet been run. Fixes flutter#178052
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…n in the root project (flutter/flutter#178175)
…oot project (flutter#178175) Using the presence of `.dart_tool` in a project to determine if it's a valid Flutter project is not correct as the directory will not exist if `flutter pub get` has not yet been run. Fixes flutter#178052
…oot project (flutter#178175) Using the presence of `.dart_tool` in a project to determine if it's a valid Flutter project is not correct as the directory will not exist if `flutter pub get` has not yet been run. Fixes flutter#178052
…oot project (flutter#178175) Using the presence of `.dart_tool` in a project to determine if it's a valid Flutter project is not correct as the directory will not exist if `flutter pub get` has not yet been run. Fixes flutter#178052
Using the presence of
.dart_toolin a project to determine if it's a valid Flutter project is not correct as the directory will not exist ifflutter pub gethas not yet been run.Fixes #178052