pub mod activity;
pub mod activitymgr;
pub mod analyzer;
pub mod barrier;
pub mod build;
pub mod cache_layout;
pub mod cluster;
pub mod clusterdrv;
pub mod clustermgr;
pub mod config;
pub mod corun;
pub mod diagnostics_store;
pub mod idle;
pub mod lsp;
pub mod model;
pub mod multiplex;
pub mod overlay;
pub mod procmacro;
pub mod recovery;
pub mod repo;
pub mod shutdown;
pub mod structural;
pub mod transport;
pub mod watcher;
pub use cargoless_cas::{ContentStore, LocalDiskStore};
pub use cargoless_proto::{
ArtifactMeta, BuildIdentity, BuildOutcome, BuildResult, BuildTrigger, CheckResult, ContentHash,
Diagnostic, FileState, InputHash, Profile, Severity, StateEvent, TargetTriple, TreeState,
};
pub use config::{FleetConfig, FleetConfigError, FleetOverrides, Provenance, Source};
pub use model::LifecycleEvent;
pub const BUILD_ID: &str = concat!("cargoless ", env!("CARGO_PKG_VERSION"));
pub fn build_id() -> &'static str {
BUILD_ID
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn build_id_is_single_consolidated_identity() {
let id = build_id();
let (name, version) = id
.split_once(' ')
.expect("BUILD_ID is `<product> <version>` (one space)");
assert!(!name.is_empty(), "product name must not be empty");
assert!(!version.is_empty(), "version must not be empty");
assert_eq!(
version,
env!("CARGO_PKG_VERSION"),
"BUILD_ID must end with the workspace package version"
);
assert_ne!(name, "tf", "bare Terraform-colliding name rejected");
assert!(
!id.contains("tf-trunk"),
"the stale `tf-trunk` placeholder must not survive #89: got {id:?}"
);
assert_eq!(build_id(), BUILD_ID);
}
#[test]
fn proto_and_cas_are_reexported() {
let _h = InputHash::new("x");
let _s = LocalDiskStore::new(std::env::temp_dir());
let _e = StateEvent::BecameRed;
let _f = FileState::Green;
let identity = BuildIdentity {
source_tree: ContentHash::new("a"),
cargo_lock: ContentHash::new("b"),
rust_toolchain: ContentHash::new("c"),
tf_config: ContentHash::new("d"),
target: TargetTriple::new("wasm32-unknown-unknown"),
profile: Profile::Dev,
};
let _m = ArtifactMeta {
input_hash: InputHash::new("x"),
identity,
};
}
}