report: reproduce the pre-refactor CLI output through the ports

Instead of carrying raw UI in core, the ports now represent everything
the CLI used to do inline:

- Prompter::present shows context outside of a question (the wizard
  summary screen, the vendoring notice spacing); TerminalPrompter
  prints it on stdout exactly like the println!s it replaces, server
  embeds forward it as a display event.
- generate_entry returns the generated entry (package, versions,
  series, path) instead of printing; the CLI renders the same lines.
- BuildTarget carries a flow-composed display line and a tee_log flag:
  the terminal adapter renders it verbatim ("Building source package
  ...", "Building ... for series/arch", "Uploading ... to ...") and
  uploads open no build log.
- The unmet build-dependency diagnostics are rendered by the CLI from
  the typed error, in the original order (details, then summary).
- --verbose constructs no live view at all (an idle widget used to
  linger), and the re-vendor offer only logs when it is actually
  asked, so headless runs print the error exactly once.
This commit is contained in:
2026-09-19 00:52:31 +02:00
parent bd8f814a53
commit 6caedce61a
11 changed files with 154 additions and 66 deletions
+5 -1
View File
@@ -541,7 +541,7 @@ async fn run_wizard(
// Summary screen + final confirmation: Ctrl+C or 'n' abort with
// nothing written (generation is all-or-nothing later anyway).
log::info!("{}", summary_text(&opts, toolchain_pin.as_deref()));
prompter.present(&summary_text(&opts, toolchain_pin.as_deref()));
if !prompter.confirm("Generate?", true)? {
return Err("Aborted: nothing was written to disk.".into());
}
@@ -575,6 +575,9 @@ pub async fn offer_verification(
};
if outcome.vendoring_failed {
// Set apart from the surrounding success output by blank lines: a
// single warning between two success lines is easy to miss.
prompter.present("");
log::warn!(
"The Cargo dependencies could NOT be vendored: this package will \
not build until the vendoring is completed by hand:\n\
@@ -582,6 +585,7 @@ pub async fn offer_verification(
\x20 2. add the printed source replacement to .cargo/config.toml, \
plus `[net] offline = true`"
);
prompter.present("");
}
if no_verify || !prompter.interactive() {