pull,package_info,ui,cli: report the pull flow via BuildView

Retire the ProgressCallback option-of-closure, the one pre-port
reporting idiom left in the tree: pull and package_info::lookup now
take &dyn BuildView like every other core flow, and the announcements
map onto message (unsized work), progress (item counts: series probes,
git objects, extraction) and progress again for byte downloads, which
the old callback carried in the same 4-argument shape.

The terminal side swaps the (ProgressBar, closure) pair for PullView, a
BuildView implementation owning one bar of the shared MultiProgress
with the same spinner/transfer style switching; it releases the line on
drop, which the CLI triggers explicitly on both outcomes since
exit(1) skips destructors. Headless callers (tests, internal lookups)
pass &report::Quiet. git clone sideband parsing is skipped entirely
when the view is not enabled, matching the old None-callback shortcut.
This commit is contained in:
2026-10-03 02:17:22 +02:00
parent 9004a33bae
commit 8c8ee5beee
8 changed files with 203 additions and 191 deletions
+2 -2
View File
@@ -2284,13 +2284,13 @@ Provides: virtual-thing (= 2.0), plain-virtual
Some(dist),
None,
None,
None,
&crate::report::Quiet,
))
.unwrap_or_else(|e| panic!("package lookup failed for {}: {}", package, e));
rt.block_on(crate::pull::pull(
&package_info,
Some(fetch_dir.path()),
None,
&crate::report::Quiet,
true,
))
.unwrap_or_else(|e| panic!("pull failed for {}: {}", package, e));