From 530b1a282817abccdc0296fc3ac1ecdaf888f21c Mon Sep 17 00:00:00 2001 From: resumeparseeval <257416811+resumeparseeval@users.noreply.github.com> Date: Sat, 27 Jun 2026 23:08:42 -0700 Subject: [PATCH] fix(gateway): don't force-enable matrix-sdk via the metrics feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `metrics` feature listed `moltis-matrix/metrics` (non-weak), which turns on the optional `moltis-matrix` dependency — and so compiles the whole `matrix-sdk` — whenever metrics are enabled, even for builds that disable the Matrix channel. Every sibling channel in the same list already uses the weak `dep?/feature` form (`moltis-discord?/metrics`, `moltis-msteams?/metrics`, `moltis-nostr?/metrics`, `moltis-signal?/metrics`); matrix is the lone inconsistency. Make it weak too: `moltis-matrix?/metrics`. The `metrics` feature now only enables matrix's own metrics when matrix is independently enabled, instead of dragging matrix into otherwise matrix-free builds. Verified with cargo tree: - `--no-default-features --features metrics` no longer pulls matrix-sdk. - the default feature set still includes matrix-sdk (no behavior change). --- crates/gateway/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gateway/Cargo.toml b/crates/gateway/Cargo.toml index 1c5541da3c..54e47a4029 100644 --- a/crates/gateway/Cargo.toml +++ b/crates/gateway/Cargo.toml @@ -179,7 +179,7 @@ metrics = [ "dep:moltis-metrics", "moltis-chat/metrics", "moltis-discord?/metrics", - "moltis-matrix/metrics", + "moltis-matrix?/metrics", "moltis-metrics/sqlite", "moltis-msteams?/metrics", "moltis-nostr?/metrics",