From 22c8678df6eb2bca25b442884039effd4f089797 Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Tue, 10 Mar 2026 17:24:58 -0500 Subject: [PATCH 1/2] Fix `cargo build -p geo_filters --features serde` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This previously failed with ``` ❯ cargo build -p geo_filters --features serde Compiling geo_filters v0.1.0 (/Users/jorendorff/src/rust-gems/crates/geo_filters) error[E0433]: failed to resolve: could not find `Deserialize` in `serde` --> crates/geo_filters/src/diff_count/sim_hash.rs:28:45 | 28 | #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] | ^^^^^^^^^^^ could not find `Deserialize` in `serde` | note: found an item that was configured out --> /Users/jorendorff/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde-1.0.214/src/lib.rs:343:24 | 341 | #[cfg(feature = "serde_derive")] | ------------------------ the item is gated behind the `serde_derive` feature 342 | #[cfg_attr(docsrs, doc(cfg(feature = "derive")))] 343 | pub use serde_derive::{Deserialize, Serialize}; | ^^^^^^^^^^^ ``` ...and two other similar errors. --- crates/geo_filters/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/geo_filters/Cargo.toml b/crates/geo_filters/Cargo.toml index 2e11184..212f913 100644 --- a/crates/geo_filters/Cargo.toml +++ b/crates/geo_filters/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "geo_filters" -version = "0.1.0" +version = "0.1.1" edition = "2021" description = "Geometric filters for set cardinality estimation." repository = "https://github.com/github/rust-gems" @@ -33,7 +33,7 @@ once_cell = "1.18" rand = { version = "0.9", optional = true } rayon = { version = "1.7", optional = true } regex = { version = "1", optional = true } -serde = { version = "1.0", default-features = false, optional = true } +serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } rand_chacha = { version = "0.9", optional = true } [dev-dependencies] From 133dca8d3213eff8f8dc5608eb2dbc5159b1d430 Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Tue, 10 Mar 2026 17:34:41 -0500 Subject: [PATCH 2/2] Add `make test` steps that would have caught this --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 770e8f3..1a19adb 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,11 @@ test: RUST_BACKTRACE=1 cargo test # Amazingly, `--all-targets` causes doc-tests not to run. RUST_BACKTRACE=1 cargo test --doc + # Check that geo_filters compiles with each feature in isolation and with no features + cargo check -p geo_filters --no-default-features + cargo check -p geo_filters --features test-support + cargo check -p geo_filters --features serde + cargo check -p geo_filters --features evaluation .PHONY: test-ignored test-ignored: