fix(ci): restore full CI green — test-matrix, clippy, rustfmt, and rustdoc gates
Root cause of the failing CI run was that examples/tests referencing feature-gated items were auto-detected (no required-features), so `--all-targets` compiled them under feature combinations where those modules didn't exist. Fixes: - mytheclipse Cargo.toml: declare the `high_level` example and `race_stress` integration test with required-features = ["full"]; `cargo build --all-targets` now skips them when full is off. This clears the whole test-matrix (workspace default, all-features, and every single-feature config) which all failed on E0432/E0433. - lib.rs: auto_metrics_service depends on service_builder, so regate it behind all(observability, resiliency) instead of observability alone (observability-only build compiled the module without resiliency). - mytheclipse-tracing: gate `pub mod fmt` behind any tracing-subscriber-providing feature so --no-default-features compiles. - mytheclipse-queue: gate `pub mod worker` behind in-memory (worker.rs requires tokio, only provided by in-memory). - clippy -D warnings fixes: deprecated base64 0.22 free fns -> Engine (paseto), unused key field, needless mut (service_builder), unused import/dead var/missing is_empty (bg_join), dead is_expired (dlock), while-let-iterator->for (parallel_map), type_complexity (shutdown_guard), MutexGuard held across await (middleware, now clones Arc'd layers), if-let-Err->is_err (queue), unused CliBuilder fields now wired into clap. - rustdoc -D warnings: resolve retry/MetricsBridge/CircuitBreaker/KeyRing intra-doc links and fix the unparseable lifecycle.rs code fence. - cargo fmt --all to satisfy the Rustfmt gate.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
//! Clap-based CLI builder implementation.
|
||||
|
||||
use clap::{Parser, Subcommand as ClapSubcommand};
|
||||
use clap::{CommandFactory, FromArgMatches, Parser, Subcommand as ClapSubcommand};
|
||||
|
||||
/// A mytheclipse CLI application.
|
||||
#[derive(Parser, Debug)]
|
||||
@@ -52,6 +52,17 @@ impl CliBuilder {
|
||||
}
|
||||
|
||||
pub fn build(self) -> CliApp {
|
||||
CliApp::parse()
|
||||
// Apply the configured name/about to the derived clap Command so the
|
||||
// builder's fields are honored in the rendered help/usage.
|
||||
let Self { name, about } = self;
|
||||
// clap's `Str`/`StyledStr` only accept 'static references, so leak
|
||||
// the owned strings (build(self) consumes self once, so a single,
|
||||
// process-lifetime leak is acceptable).
|
||||
let name: &'static str = String::leak(name);
|
||||
let about: &'static str = String::leak(about);
|
||||
let cmd = <CliApp as CommandFactory>::command()
|
||||
.name(name)
|
||||
.about(about);
|
||||
CliApp::from_arg_matches(&cmd.get_matches()).unwrap_or_else(|e| e.exit())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user