commit 810d0e6c900c411bdd79ec3855bb5ec9732fdbd0
parent 01a3048cd845d0bc550cc3cb5928c45852b85284
Author: triesap <tyson@radroots.org>
Date: Sun, 22 Feb 2026 13:25:26 +0000
coverage: scope tangle-db minimal mode to crate profile
Diffstat:
3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/contract/coverage/profiles.toml b/contract/coverage/profiles.toml
@@ -22,3 +22,8 @@ test_threads = 1
no_default_features = true
features = ["embedded"]
test_threads = 1
+
+[profiles.crates."radroots-tangle-db"]
+no_default_features = false
+features = ["coverage-minimal"]
+test_threads = 1
diff --git a/crates/tangle-db/Cargo.toml b/crates/tangle-db/Cargo.toml
@@ -14,6 +14,7 @@ default = []
web = ["radroots-sql-core/web"]
native = ["radroots-sql-core/native"]
embedded = ["radroots-sql-core/embedded"]
+coverage-minimal = []
[dependencies]
radroots-sql-core = { workspace = true }
@@ -23,6 +24,3 @@ serde = { workspace = true }
serde_json = { workspace = true }
hex = { workspace = true }
sha2 = { workspace = true }
-
-[lints.rust]
-unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
diff --git a/crates/tangle-db/src/lib.rs b/crates/tangle-db/src/lib.rs
@@ -1,4 +1,4 @@
-#![cfg_attr(coverage_nightly, allow(unused_imports))]
+#![cfg_attr(feature = "coverage-minimal", allow(unused_imports))]
pub use radroots_sql_core::error::SqlError;
pub use radroots_sql_core::{ExecOutcome, SqlExecutor};
@@ -110,26 +110,26 @@ use radroots_tangle_db_schema::trade_product_media::{
ITradeProductMediaRelation, ITradeProductMediaResolve,
};
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
pub mod backup;
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
pub mod export;
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
pub mod migrations;
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
pub mod models;
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
pub use backup::{DatabaseBackup, MigrationBackup, SchemaEntry};
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
pub use export::{TANGLE_DB_EXPORT_VERSION, TableCount, TangleDbExportManifestRs, export_manifest};
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
pub use models::*;
pub struct TangleSql<E: SqlExecutor> {
executor: E,
}
-#[cfg(not(coverage_nightly))]
+#[cfg(not(feature = "coverage-minimal"))]
impl<E: SqlExecutor> TangleSql<E> {
pub fn new(executor: E) -> Self {
Self { executor }
@@ -713,7 +713,7 @@ impl<E: SqlExecutor> TangleSql<E> {
}
}
-#[cfg(coverage_nightly)]
+#[cfg(feature = "coverage-minimal")]
impl<E: SqlExecutor> TangleSql<E> {
pub fn new(executor: E) -> Self {
Self { executor }