`dotnetup` `--no-progress` shows progress (and poorly formatted progress at that)
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
# `dotnetup` `--no-progress` produces noisy, misleading output
## Summary
When invoking `dotnetup runtime install` (and `sdk install`) with `--no-progress`,
the command still emits a stream of interleaved status lines that look like an
animated progress display rendered as plain text. The output is hard to read,
contains misleading information, and — given the flag name — arguably shouldn't
be printed at all.
## Repro
```pwsh
.\eng\dotnetup\dotnetup.exe runtime install 6.0.36 7.0.20 8.0.27 9.0.16 10.0.8 `
--install-path D:\sdk\.dotnet `
--no-progress `
--set-default-install false `
--untracked `
--interactive false
```
(Invoked from `eng/restore-toolset.ps1` during `build.cmd` on `dotnet/sdk`.)
## Observed output
```
Installing dotnet (runtime) 6.0.36, dotnet (runtime) 7.0.20, dotnet (runtime) 8.0.27, dotnet (runtime) 9.0.16, dotnet (runtime) 10.0.8 to D:\sdk\.dotnet...
Downloading dotnet (runtime) 6.0.36...
Downloading dotnet (runtime) 7.0.20...
Downloading dotnet (runtime) 8.0.27...
Completed: Downloading dotnet (runtime) 8.0.27 ( 0.0 MB / 0.0 MB)
Installing dotnet (runtime) 8.0.27 ...
Completed: Downloading dotnet (runtime) 7.0.20 ( 0.0 MB / 0.0 MB)
Completed: Downloading dotnet (runtime) 6.0.36 ( 0.0 MB / 0.0 MB)
Completed: Installing dotnet (runtime) 8.0.27
Installing dotnet (runtime) 7.0.20 ...
Downloading dotnet (runtime) 10.0.8...
Downloading dotnet (runtime) 9.0.16...
Completed: Installing dotnet (runtime) 7.0.20
Installing dotnet (runtime) 6.0.36 ...
Completed: Installing dotnet (runtime) 6.0.36
Completed: Downloading dotnet (runtime) 10.0.8 ( 0.0 MB / 0.0 MB)
Installing dotnet (runtime) 10.0.8 ...
Completed: Downloading dotnet (runtime) 9.0.16 ( 0.0 MB / 0.0 MB)
Completed: Installing dotnet (runtime) 10.0.8
Installing dotnet (runtime) 9.0.16 ...
Completed: Installing dotnet (runtime) 9.0.16
Installed at D:\sdk\.dotnet:
dotnet (runtime) 8.0.27
dotnet (runtime) 7.0.20
dotnet (runtime) 6.0.36
dotnet (runtime) 10.0.8
dotnet (runtime) 9.0.16
```
## Issues
1. **`--no-progress` still shows progress.** The flag's purpose is to disable
the progress display, but a full per-item `Downloading… / Completed:
Downloading… / Installing… / Completed: Installing…` sequence is still
printed for every package. With `--no-progress`, the only output should
arguably be a single line per item at completion, or nothing until the
final summary.
2. **Sizes are reported as `0.0 MB / 0.0 MB`.** Every `Completed: Downloading`
line shows `( 0.0 MB / 0.0 MB)` even though the runtimes are tens of MB
each. Either the size counters aren't wired up in the non-progress path, or
they're being captured after the buffer has been disposed/reset. If totals
aren't known with `--no-progress`, omit them rather than printing zeros.
3. **No indication when an install is already present.** Re-running the same
command logs `Downloading… / Installing… / Completed:` lines for runtimes
that are already installed, so there's no way to tell from the output
whether a network download happened or the existing install was reused.
Idempotent invocations should say something like
`dotnet (runtime) 6.0.36 is already installed at D:\sdk\.dotnet`, or print
nothing at all for that item.
4. **Indentation/column alignment is broken.** Lines mix variable amounts of
whitespace:
- `Downloading dotnet (runtime) 6.0.36...`
- `Installing dotnet (runtime) 8.0.27 ...`
- `Completed: Downloading dotnet (runtime) 8.0.27 ( 0.0 MB / 0.0 MB)`
The verbs (`Downloading`, `Installing`, `Completed: Downloading`,
`Completed: Installing`) have different widths but the column after them
is padded with a fixed amount of whitespace, so nothing actually lines up.
The trailing `...` and the size suffix also float to different columns
depending on the verb. In the animated Spectre progress UI this works
because each row is rewritten in place; in the plain-text fallback the
padding just looks like a bug.
5. **Order is non-deterministic.** Because the lines come from concurrent
install tasks but are no longer collapsed into a live table, the output
interleaves arbitrarily. That's expected for the animated view but is
noise in a log; in `--no-progress` mode each item should probably be
reported as a single atomic line on completion, in input order.
## Expected
With `--no-progress`, the command should produce minimal, deterministic
output suitable for log files. Something like:
```
Installing dotnet (runtime) 6.0.36, 7.0.20, 8.0.27, 9.0.16, 10.0.8 to D:\sdk\.dotnet...
dotnet (runtime) 6.0.36 installed (28.3 MB)
dotnet (runtime) 7.0.20 installed (29.1 MB)
dotnet (runtime) 8.0.27 already present, skipped
dotnet (runtime) 9.0.16 installed (30.4 MB)
dotnet (runtime) 10.0.8 installed (31.2 MB)
Installed at D:\sdk\.dotnet.
```
…or, if the design intent is "completely silent on success", just the final
`Installed at …` summary block.
## Environment
- `dotnetup.exe` from `dotnet/sdk` branch `nagilson-use-dotnetup-to-install-sdk`,
pulled via `scripts/get-dotnetup.ps1`.
- Windows 11, PowerShell 7, `pwsh` terminal (not redirected).
- Invoked from `eng/configure-toolset.ps1` / `eng/restore-toolset.ps1`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.