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

Better CLI feedback for e.g. ng serve. #20957

Closed
1 task done
infacto opened this issue May 26, 2021 · 8 comments · Fixed by #20960
Closed
1 task done

Better CLI feedback for e.g. ng serve. #20957

infacto opened this issue May 26, 2021 · 8 comments · Fixed by #20960
Assignees
Labels
Milestone

Comments

@infacto
Copy link

infacto commented May 26, 2021

🚀 Improvement / Bug report / Feature request.

Command

Description

Just a small request: ng serve (and maybe all other commands) should print some text instantly after the command is executed.

demo

You can see that after enter ng serve there is a long waiting time without any response. Appears to be dead. Annoying.
I would prefer an initial message directly after the command was entered. Something like:

ng serve
Builds and serves your app, rebuilding on file changes.
[-] Generating browser bla bla ...

This text comes from the docs. But we could also just print: Preparing... or the joke of the day.
Seriously, no response feedback on command execution feels weird and seems to be frozen.

Maybe this should be implemented on all commands?

@alan-agius4
Copy link
Collaborator

Is the progress option disabled by any chance?

If progress, is enabled feedback should be pretty quick.

@infacto
Copy link
Author

infacto commented May 26, 2021

What exactly do you mean? I cannot find any process option. Where can I find this option?
But I didn't do anything special. No custom configuration. @angular/cli and run ng serve. No additional parameters. If this option is disabled by default, it should be changed...

@alan-agius4
Copy link
Collaborator

progress not process. It’s enabled by default.

https://angular.io/cli/build.

Just want to confirm that you are not turning this

@infacto
Copy link
Author

infacto commented May 26, 2021

Sorry I also meant progress. Just a typo.
Now I ran ng serve --progress. No difference. Just a warning that "progress" is deprecated.

Following the docs:

--progress Log progress to the console while building.

I already see the building output. If I run with --progress="false" the log is blank. See my gif record on the initial post. If progress is disabled there is no Generating browser ... line. Just the final message Compiled successfully.

I mean the waiting between ng serve and the first print Generating browser ...


Here the same gif as in my initial post. A prove that progress is not disabled. Just watch it. It may take some seconds. And this demo record is a lucky case. Sometimes it takes a lot of more time until the first print appears.

It would be great if the CLI instantly prints some text like Preparing... when a command is executed. Without any (complex / delayed) logic. Just like an echo. A quick confirmation feedback.

@eneajaho
Copy link
Contributor

What @infacto is trying to say is that there is a delay between the time we execute ng serve and the first text shown on the terminal that something is being generated. (env: Windows)

@alan-agius4
Copy link
Collaborator

@infacto, I didn’t realise it was an animated GIF 😅

I have some ideas in mind which I am hoping to explore soon to tackle this issue.

@ngbot ngbot bot modified the milestone: Backlog May 26, 2021
@infacto
Copy link
Author

infacto commented May 26, 2021

I didn’t realise it was an animated GIF

Haha, exactly this is the problem here. 😄 It appears frozen.

@alan-agius4 alan-agius4 self-assigned this May 27, 2021
filipesilva pushed a commit that referenced this issue May 31, 2021
…n console

With this change we provide earlier feedback in the console during a build. The setup phase can take some times if the project has a large set of dependencies.

We also move several warnings in the dev-server to an earlier phase so that we don't clutter the progress indicator.

Closes #20957
filipesilva pushed a commit that referenced this issue May 31, 2021
…n console

With this change we provide earlier feedback in the console during a build. The setup phase can take some times if the project has a large set of dependencies.

We also move several warnings in the dev-server to an earlier phase so that we don't clutter the progress indicator.

Closes #20957

(cherry picked from commit f9acdc7)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants