summaryrefslogtreecommitdiffstats
path: root/src/pipeline/mod.rs
diff options
context:
space:
mode:
authordev <dev@example.com>2026-11-21 19:29:41 +0000
committerdev <dev@example.com>2026-11-21 19:29:41 +0000
commitbb1d533515c8f63faacb00b3ef59232cf2d4a1c5 (patch)
tree94da9ecc261f28f12ac6e74b29b27f3aef4b1e77 /src/pipeline/mod.rs
parent0f18ebddc1c138c531e3e331786c7fa917d9186f (diff)
downloadaur-build-bb1d533515c8f63faacb00b3ef59232cf2d4a1c5.tar.gz
aur-build-bb1d533515c8f63faacb00b3ef59232cf2d4a1c5.zip
pipeline,sandbox,shims: thirty-two more markers the compiler was willing to take
The whole `shims` module is behind `test-support`, so its thirteen `pub(crate)` items were invisible to a release build already — but `pub(crate)` still made each of them part of the crate's interface to every other module, and none of them had a reader outside the file that declares it. `manifest`, `record`, `split_version`, `valid_db_arg`, `DB_SUFFIXES` and the nine tool entry points are now private to `src/shims/mod.rs`, which is where the shim binaries reach them through the module's own `pub` surface. `pipeline` went 16 -> 4 and `sandbox` 16 -> 9. Two refusals are worth the sentence: `SourceIdentity` is the type of the `pub(crate)` field `Ctx::src`, and a field may not be more reachable than its type, so making it private is the `private_interfaces` warning rather than a legal narrowing. `provision_request` is declared inside the private `kata_backend` module and called from the sibling `#[cfg(test)] mod tests`, and privacy does not cross to a sibling — E0624. Both are argued in `over_visibility.allowlist` now instead of sitting unexplained. `LOW` in `review` is the same sibling case one level up: it lives in the `pub mod level` nested in risk.rs and the scorer in the parent module reads `level::LOW`, so `pub(crate)` is the narrowest thing that reaches, given that this crate does not admit `pub(super)`. priv 149 -> 117, overwide 21 -> 0 unargued. `cargo check` clean under both profiles with no new warnings; tests/pipeline.rs, remote_agent.rs, kata.rs, approve.rs, shims.rs and world.rs pass (62 tests), and `cargo test --test architecture` is 16 passed.
Diffstat (limited to 'src/pipeline/mod.rs')
-rw-r--r--src/pipeline/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pipeline/mod.rs b/src/pipeline/mod.rs
index e571d71..3e63a69 100644
--- a/src/pipeline/mod.rs
+++ b/src/pipeline/mod.rs
@@ -25,7 +25,7 @@ pub(crate) struct SourceIdentity {
}
impl SourceIdentity {
- pub(crate) fn from_candidate(c: &CandidateRow, snapshot: &SnapshotRow) -> Self {
+ fn from_candidate(c: &CandidateRow, snapshot: &SnapshotRow) -> Self {
Self {
aur_commit: snapshot.aur_commit.clone(),
recipe_hash: snapshot.recipe_hash.clone(),
@@ -36,7 +36,7 @@ impl SourceIdentity {
pkgrel: c.pkgrel.clone(),
}
}
- pub(crate) fn from_release(r: &ReleaseRow) -> Self {
+ fn from_release(r: &ReleaseRow) -> Self {
Self {
aur_commit: r.aur_commit.clone(),
recipe_hash: r.recipe_hash.clone(),
@@ -53,7 +53,7 @@ impl SourceIdentity {
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
-pub(crate) struct CollectedPkg {
+struct CollectedPkg {
pub name: String,
pub version: String,
pub arch: String,
@@ -69,7 +69,7 @@ pub(crate) struct CollectedPkg {
}
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
-pub(crate) struct Collect {
+struct Collect {
pub packages: Vec<CollectedPkg>,
}
@@ -154,7 +154,7 @@ impl Ctx {
self.backend.acquire(&spec)
}
- pub(crate) fn log_line(&self, line: &str) {
+ fn log_line(&self, line: &str) {
use std::io::Write;
if let Some(parent) = self.log.parent() {
let _ = std::fs::create_dir_all(parent);
@@ -195,7 +195,7 @@ pub fn run_with(ctx: &Ctx) -> Result<Outcome> {
}
#[cfg(not(feature = "test-support"))]
-pub(crate) fn run_with(ctx: &Ctx) -> Result<Outcome> {
+fn run_with(ctx: &Ctx) -> Result<Outcome> {
run_with_impl(ctx)
}
@@ -299,7 +299,7 @@ pub fn enqueue_manual_rebuild(cfg: &Config, db: &Db, pkgbase: &str) -> Result<St
Ok(id)
}
-pub(crate) enum StepResult {
+enum StepResult {
Done(Option<String>),
Skipped(String),
Blocked(Vec<String>),