This will fix the broken spinners that indicate steps which are currently in progress. To achieve this the behavior of the progressbar helper had to be adjusted. The multibar does not work while a child process is run with `std::process::Command`. Using multiple spinners without a multibar is problematic as well because emitting warnings, infos and errors while a single spinner is active will duplicate the spinners message. The spinner will also absorb the last warning/error/info. Instead of publishing warnings, errors and infos immediately they will now be cached and only output when the current spinner finishes. To make sure we can output all warnings to the user ProgressBars are no longer exposed to the caller. Instead the active spinner will be finished implicitly when a new spinner is allocated with the `message()` function. Instead of relying on the `done()` function to be called the progressbar now implements the `Drop` trait which will finish the last spinner automatically. Unfortunately, this introduces members that have to be mutable. To not have to deal with mutable ProgressOutput all over the place the members were put inside an RwLock. This allows us to use ProgressOutput from inside multiple threads to emit warnings and errors.master
parent
a8d6e6864a
commit
9a220f10dd
Loading…
Reference in new issue