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

Indicate that composer is actually working with `create-project`, instead of appearing unresponsive #8409

Open
polarathene opened this issue Nov 4, 2019 · 6 comments · May be fixed by #8412

Comments

@polarathene
Copy link

@polarathene polarathene commented Nov 4, 2019

When I run this command:

composer create-project --prefer-dist laravel/laravel blog

I get the following output:

> composer create-project --prefer-dist laravel/laravel blog
_

And I expected this to happen:

> composer create-project --prefer-dist laravel/laravel blog
Downloading dependencies...

~14MB downloads before any output from composer's command begins(with ~4MB more downloaded for dependencies).

On a slow connection this can appear unresponsive(this was taking about a minute). As my network is usually faster(1MB/sec), and the lack of input, I was under the impression the command was hanging(new to composer), thinking there was something wrong with my system..

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Nov 4, 2019

You can get more progressive feedback if you enable more verbosity (-v, -vv or -vvv).

@alcohol alcohol closed this Nov 4, 2019
@polarathene

This comment has been minimized.

Copy link
Author

@polarathene polarathene commented Nov 4, 2019

@alcohol ok, thanks for that. It doesn't really help resolve the experience for new users though. I am new to PHP and Composer, and my first usage of composer was the command above.

Do you find it acceptable for a user to have no immediate feedback for a minute or longer due to waiting on network download for any output? I did not require any additional verbosity elsewhere in the output, just feedback that Composer was actually working and not hanging.

I cannot imagine any drawbacks from an added line of output?

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Nov 4, 2019

The initial step of create-project does a git clone of your target specified. So how long that takes depends on how large your git repository is. The clone happens in the background, so there is not much to output.

@polarathene

This comment has been minimized.

Copy link
Author

@polarathene polarathene commented Nov 4, 2019

@alcohol How long it takes also depends on the network connection as well...? I'm not sure why you bring that up, as shown above, it can take over a minute, on another machine/network perhaps far less, but for some users it can take a fair amount of time before any output from composer is provided.

The clone happens in the background, so there is not much to output.

I'm confused.. Do you understand what issue I'm raising here?

It's a UX issue. Especially for new users, when the command can run with no output for over a minute suggests the utility is unresponsive/broken.

Not unlike if you navigated to a webpage and it took a minute before anything appeared. You could open up the dev tools or monitor your network to see if anything was actually happening, but some indication of the page actually loading beyond a blank page would be desirable right?


All I'm requesting, is an improvement that shows the composer command has actually began something, that it's running. I know better now, but I was quite confused at the time until some actual output was received.

I thought it'd be worth letting you know about this, but if you don't feel it's important to improve the UX for this scenario, that's fine.

@alcohol

This comment has been minimized.

Copy link
Member

@alcohol alcohol commented Nov 4, 2019

🤷‍♂

I'm not in a position to judge if this needs improving or not since I am biased. I know how the tool works so I know why it can take a while before more meaningful output is generated (when not using verbose output).

I personally do not like adding output just for the sake of adding output. I'm a patient person and I don't assume things are broken just because I don't get instant feedback. This is of course a personal opinion and we should probably try to aim for what the majority of our users feels is "good".

All I'm requesting, is an improvement that shows the composer command has actually began something, that it's running.

We don't really handle requests, unless it involves the word "pull" ;-)

Seriously though, submit a pull requests and we'll look it over. I'm not sure where in the flow and what kind of feedback would improve the UX here, but you seem to have some ideas about that so go ahead 👍

@alcohol alcohol reopened this Nov 4, 2019
@polarathene polarathene linked a pull request that will close this issue Nov 5, 2019
@polarathene

This comment has been minimized.

Copy link
Author

@polarathene polarathene commented Nov 5, 2019

I don't assume things are broken just because I don't get instant feedback.

I wouldn't call a 90 second delay instant feedback..

If I had used Composer prior and not had an experience with a long delay, perhaps this would be a non-issue for me as well. Being new to PHP, I had to provide some additonal extensions to get it working, so it wasn't obvious if it was working. I only noticed due to the network activity while leaving it to run and investigating why it appeared to be unresponsive.

We don't really handle requests, unless it involves the word "pull" ;-)

Done ;-)

I'm not sure where in the flow and what kind of feedback would improve the UX here, but you seem to have some ideas about that so go ahead

The initial ~14MB wasn't due to downloading dependencies for laravel, afaik it was downloading some sort of metadata?(something in the getBestCandidate() method) Presumably to choose what package version to download.

I went with a fairly generic message related to the command instead. I am new to PHP, I'm not sure how to add a delay with a boolean toggle so it's only displayed on slow connections, so it'll be one additional line(to what is many anyhow afaik?) for everyone.

Also moved install directory check prior to the network request so it fails fast(linked related issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.