roots / trellis-cli

A CLI to manage Trellis projects
https://roots.io/trellis/
MIT License
168 stars 24 forks source link

Feature Request: `Installing dependencies` step with more progress information #306

Closed strarsis closed 1 year ago

strarsis commented 2 years ago

Terms

Summary

The Installing dependencies (this can take a minute...) step can take quite a while apparently (with slower internet connections).

Motivation

Why are we doing this?

Knowing the progress would be very helpful, in order to detect stalling. The additional note this can take a minute is colloquial, but for low internet bandwidths the process takes significantly longer than just a minute.

What use cases does it support?

Workstations with slow internet connection (or I/O, CPU, anything that may slow down the installation).

What is the expected outcome?

The dev knows how much time this trellis init step takes, whether something stalled, whether the internet connection is fast enough.

Potential conflicts / foreseeable issues

None really. If the detailed progress really bothers, a CLI switch could be used to turn this on.

Additional Context

As pip is used internally, showing its progress (how many dependencies installed of how many need to be installed, download progress, installation progress) or some part of it should be sufficient.

swalkinshaw commented 2 years ago

This is a good point... it's tough to have a nice UI while also displaying all relevant info. And in this case pip's normal output is not very nice, so trellis-cli just hides it behind a spinner. I'm not sure how possible it is to make a custom UI since I'm guessing pip doesn't provide any programmatic output like that.

So I think there's three options:

  1. show nothing until complete (what it does now)
  2. show the current output under a spinner
  3. show the current output after some threshold? say 1 minute to literally match up with the text
strarsis commented 2 years ago

The wait threshold idea is great! Because I had the impression that this step hangs (had a bad internet connection during the process).