Skip to content

make flutter create less chatty #6197

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
wants to merge 1 commit into from

Conversation

danrubel
Copy link
Contributor

@danrubel danrubel commented Oct 4, 2016

Fixes #6191
@pq

@pq
Copy link
Contributor

pq commented Oct 4, 2016

What's the output after this patch?

@danrubel
Copy link
Contributor Author

danrubel commented Oct 4, 2016

@pq - example output with patch

$ flutter create myapp
Creating project myapp in 
  /usr/local/google/home/danrubel/work/git/flutter/myapp

Running 'pub get' in myapp...                        1.4s

[✓] Flutter is fully installed. (on Linux, channel master)
[✓] Android toolchain - develop for Android devices is fully installed. (Android SDK 23.0.2)
[x] Atom - a lightweight development environment for Flutter is not installed.
[✓] Connected devices is fully installed.

Run "flutter doctor" for information about installing additional components.
All done! In order to run your application, type:

  $ cd /usr/local/google/home/danrubel/work/git/flutter/myapp
  $ flutter run

@pq
Copy link
Contributor

pq commented Oct 4, 2016

Thanks! IMO that's a little "too" minimal.

When @devoncarew suggested:

flutter create is really very noise. We started printing out all files when we were only creating 4 or so files. That moved to ~30 with the ios and android templates. Perhaps we should summarize all the files in subdirs? Or in ios/ and android/? /cc @danrubel

I took that more to mean summarizing some of the big subdirs. I still think links to things like the main entry point (lib/main.dart) are good.

I'll defer to @devoncarew for his 2 cents though.

@danrubel
Copy link
Contributor Author

danrubel commented Oct 4, 2016

IMO listing the major directories or anything like that provides little incremental value at extra flutter_tools code complexity. The user will likely open the project in their IDE of choice and see the project structure there.

@pq
Copy link
Contributor

pq commented Oct 4, 2016

I'm not sure... But then I don't know the motivations for adding it in the first place! :)

The user will likely open the project in their IDE of choice and see the project structure there.

Maybe. But there are always going to be folks that prefer the CLI and we should make the experience there as nice as possible.

@danrubel
Copy link
Contributor Author

danrubel commented Oct 4, 2016

I agree that we want a nice CLI experience. IMO the other information that we print during flutter create has a much higher value and more != better. If a developer using the CLI wants to see the directory structure, they would type $ find myapp -type d.

@Hixie
Copy link
Contributor

Hixie commented Oct 4, 2016

Honestly I'd consider even silencing the flutter doctor output unless it shows a problem.

The one thing I'd say about the file listing is that it did give new users a sense of what was where, which is nice. They might not think to look at the directory structure, but if it's right there it's hard to miss. We probably don't need to list every last PNG though.

Should we maybe silence the pub get thing? After all, we're hiding the existence of pub now. Maybe we should just have one progress meter for the whole creation?

One thing regardless of the above is that we should put a new line before the "All done". Right now it reads like it's part of the last paragraph of the flutter doctor output which is confusing since it's the most important thing in the output.

@devoncarew
Copy link
Member

devoncarew commented Oct 5, 2016

I agree w/ the code complexity angle. At the same time, it's nice to give some sense of how much work we did, and an sketch of the project that was generated. Perhaps thats:

Creating project myapp...
Wrote 27 files.

and

  $ cd myapp
  $ flutter run lib/main.dart

@devoncarew devoncarew mentioned this pull request Oct 5, 2016
@danrubel
Copy link
Contributor Author

danrubel commented Oct 5, 2016

Merged into #6213

@danrubel danrubel closed this Oct 5, 2016
@danrubel danrubel deleted the flutter-create-less-chatty branch October 5, 2016 22:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make flutter create less chatty
4 participants