# By default minimize build progress log

**URL:** <https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741>\
**Category:** tools and infrastructure\
**Created:** [October 22, 2023, 7:35pm UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741 "2023-10-22T19:35:02Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![zackw](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/zackw/32/2071_2.png) [@zackw](https://internals.rust-lang.org/u/zackw)\
**Post date:** [October 24, 2023, 11:13pm UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741/21 "2023-10-24T23:13:44Z")

</div>

If by "interactive mode" you mean "stdout is a terminal" then that _could_ be a way to have it both ways, yeah.

---

<div class="post-metadata">

**Author:** ![djc](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/djc/32/1592_2.png) [@djc](https://internals.rust-lang.org/u/djc)\
**Post date:** [October 25, 2023, 1:34pm UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741/22 "2023-10-25T13:34:41Z")

</div>

I think a decent option here would be a an indicatif `MultiProgress` that shows each crate as it gets compiled, but removes them after the compilation is done (maybe only if successful?). If we want to get a fancy about it, it's possible to make that kind of tree-like such that you get a better sense of which nodes in your dependency graph are contributing to your compile time.

Example video:

[https://dirkjan.ochtman.nl/files/indicatif-multi-tree.mov](https://dirkjan.ochtman.nl/files/indicatif-multi-tree.mov)

---

<div class="post-metadata">

**Author:** ![epage](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/epage/32/3171_2.png) [@epage](https://internals.rust-lang.org/u/epage)\
**Post date:** [October 25, 2023, 1:40pm UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741/23 "2023-10-25T13:40:37Z")

</div>

Before going too far into design, I'd recommend resolving the concern my earlier comment

> [@epage](#):
>
> The biggest concern is how well how well the fancier terminal control codes are supported across terminals. This isn't a question of "works in top 5 terminals" but the long tail and how to best gracefully degrade for that long tail.

For example

- We more exhaustively test various terminals
- We make this a `term` setting with an "auto detect" that works off of a `TERM` verified list and provide a process for people to verify and add new `TERM`s

---

<div class="post-metadata">

**Author:** ![8573](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/8573/32/4913_2.png) [@8573](https://internals.rust-lang.org/u/8573)\
**Post date:** [October 25, 2023, 10:21pm UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741/24 "2023-10-25T22:21:07Z")

</div>

> [@zackw](#):
>
> If by "interactive mode" you mean "stdout is a terminal"

Do CI environments present stdout to the build process as not-a-terminal or as a terminal? I seem to remember seeing "interactive"-style progress indicators twirling around in the log output of running GitLab CI jobs.

---

<div class="post-metadata">

**Author:** ![CAD97](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/cad97/32/3460_2.png) [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Post date:** [October 26, 2023, 1:01am UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741/25 "2023-10-26T01:01:35Z")

</div>

FWIW, most (but not all) CI runners set `$CI` to `1` or `true` by default, if having different default behavior on CI is important.

---

<div class="post-metadata">

**Author:** ![mathstuf](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mathstuf](https://internals.rust-lang.org/u/mathstuf)\
**Post date:** [October 30, 2023, 12:13pm UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741/26 "2023-10-30T12:13:37Z")

</div>

> [@zackw](#):
>
> I don't think I've _ever_ seen CI builds changed away from the default log verbosity in real life.

Behold, [the CI for `git-workarea`](https://gitlab.kitware.com/utils/rust-git-workarea/-/blob/53ff445323d41e4fead827b312fefdcd867a7c8e/.gitlab/cargo.yml#L52). You can check the blame there too; been using it for years 🙂 . Then again, I'm someone who lives and breathes build systems (CMake developer; I'm also aware of your role in the `autoconf` stack)…I vastly prefer the defaults to be "summary by default, but easy to ask for verbosity". I've had to field way too many reports where the wrong part is focused on/provided because the "real" problem is lost in a sea of output and many developers' "this looks like the problem" detectors are…not great for build system issues (spurious messages are too common and _very_ distracting).

> [@CAD97](#):
>
> FWIW, most (but not all) CI runners set `$CI` to `1` or `true` by default, if having different default behavior on CI is important.

This sounds like a better thing to key on than "output is a TTY" because:

- editors which launch builds tend not to forward a full-featured TTY;
- when debugging CI locally, behaving like CI is very important (rather than faffing about trying to figure out how to convince tools to behave like they do "in the cloud");
- logging to files in CI and locally are both common enough (for me at least) because CI logs have size limits after which they just stop listening (GitLab-CI) or I want to shuttle output to outside of the container (e.g., shimming in a `grep` as Vim's `:mak` command to "reproduce" the warnings in a useful development environment for guided fixing).

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [January 28, 2024, 12:14pm UTC](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741/27 "2024-01-28T12:14:02Z")

</div>

Closed on January 28, 2024, 12:14pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

[Previous page](https://internals.rust-lang.org/t/by-default-minimize-build-progress-log/19741.md?page=1)
