From c295510e2bb0ee61234536c832dad87a45977fc8 Mon Sep 17 00:00:00 2001 From: aur-build Date: Fri, 20 Nov 2026 23:38:01 +0000 Subject: sandbox: keep `Exit` out of the release build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Exit` is the result of running a command in a sandbox. `pipeline` consumes it through `Sandbox::run` — `.success()`, `.stderr` — without ever writing the name, which is why the census called it dead outside `sandbox`. The type now lives in a private `mod exit` and reaches the world through an alias that is `pub` only under `test-support` and `pub(crate)` otherwise. A `pub` definition inside a private module is not a nameable path from outside, but it is visible enough to appear in a public trait signature, which is what makes this possible where a plain `pub(crate) struct` is not. Verified with an external crate: naming `aur_build::sandbox::Exit` in a release build is `error[E0603]: struct Exit is private`; with `test-support` it compiles. --- src/watch/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/watch/mod.rs') diff --git a/src/watch/mod.rs b/src/watch/mod.rs index 839596a..46ef55a 100644 --- a/src/watch/mod.rs +++ b/src/watch/mod.rs @@ -7,5 +7,8 @@ pub mod staleness; pub mod upstream; pub use detect::{check_pkgbase, Outcome}; -pub use mirror::sync_mirror; +// `mirror::sync_mirror` used to be re-exported here. Nothing used the alias — +// `detect.rs` and `tests/detect.rs` both go through `watch::mirror` directly — +// and a re-export of a conditionally-visible item has to be split by feature +// too, so the dead alias is simply gone. pub use scheduler::spawn_scheduler; -- cgit v1.2.3