This repository has been archived by the owner on Nov 8, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate output towards the 1.0 strategy
This commit is the first in what is hopefully a series to help move `wasm-pack`'s CLI output and interactions to a "1.0 status". This was [discussed at the recent Rust All Hands][discussion] where the salient points we ended up extracting were: * At all times if a user is waiting for `wasm-pack` to finish it should be clear what's being waited on. * As an example, Cargo's own output shows what crate is being built. * As another example, something that always takes only a handful of milliseconds to complete doesn't need an informational message. * The final output products of a command should always be clear and printed. For example the output location of artifacts should always be printed. * The `wasm-pack` CLI tool should use "progressive enhancement" to incrementally detect features of the output it can use (like colors, emoji, etc) but always work in the absence of these features. This'll help us support a wide range of use cases and terminals. The goal of this commit is to not get us all the way there but start us down the path to satisfying these goals. To that end the major change here is to remove the dependency on `indicatif`. Using `indicatif` requires that all output is piped through the `indicatif` crate itself, which causes the third item here to not work for one of the main parts of `wasm-pack build`, the `cargo` pieces. Cargo (and the Rust compiler) are unable to use thir own tools for progressive enhancement when the output is captured and sent through `indicatif`. Lots more refactoring will be needed internally to fully polish off the input/output to a "1.0 status", but this is hopefully a good start! [discussion]: https://gist.github.com/fitzgen/23a62ebbd67574b9f6f72e5ac8eaeb67#file-road-to-wasm-pack-1-0-md
- Loading branch information