From 3963b9cc7349f5c9e067b1f47ea1ea723acd219b Mon Sep 17 00:00:00 2001 From: Nav Saini Date: Thu, 14 May 2026 18:49:00 +0000 Subject: [PATCH] statsig-ffi, statsig-pyo3: add exposure_dedupe_max_keys to exhaustive initializers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bounded-LRU change added a new field `exposure_dedupe_max_keys` to StatsigOptions but two sibling crates have exhaustive struct literals that don't use `..StatsigOptions::default()`: statsig-ffi/src/statsig_options_c.rs:139 statsig-pyo3/src/statsig_options_py.rs:334 Both now fail to compile with E0063 "missing field". This PR adds the field (defaulted to None) to both initializers so cdylib and Python bindings builds compile again. The C/Python bindings don't surface the new option to callers — that would require adding fields to StatsigOptionsData (C) and StatsigOptionsPy (Python) and threading them through. Defaulting to None preserves the existing behavior (uses SAMPLING_MAX_KEYS) for non-Rust callers. Co-Authored-By: Claude Opus 4.7 (1M context) --- statsig-ffi/src/statsig_options_c.rs | 1 + statsig-pyo3/src/statsig_options_py.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/statsig-ffi/src/statsig_options_c.rs b/statsig-ffi/src/statsig_options_c.rs index 07e36877..dc19f725 100644 --- a/statsig-ffi/src/statsig_options_c.rs +++ b/statsig-ffi/src/statsig_options_c.rs @@ -153,6 +153,7 @@ impl From for StatsigOptions { event_logging_flush_interval_ms: None, // Deprecated event_logging_max_pending_batch_queue_size, event_logging_max_queue_size: data.event_logging_max_queue_size, + exposure_dedupe_max_keys: None, fallback_to_statsig_api: data.fallback_to_statsig_api, global_custom_fields: data.global_custom_fields, id_lists_adapter: None, // todo: add support for id lists adapter diff --git a/statsig-pyo3/src/statsig_options_py.rs b/statsig-pyo3/src/statsig_options_py.rs index 86e6b946..92759c6f 100644 --- a/statsig-pyo3/src/statsig_options_py.rs +++ b/statsig-pyo3/src/statsig_options_py.rs @@ -357,6 +357,7 @@ fn create_inner_statsig_options( event_logging_flush_interval_ms: None, event_logging_max_queue_size: opts.event_logging_max_queue_size, event_logging_max_pending_batch_queue_size: opts.event_logging_max_pending_batch_queue_size, + exposure_dedupe_max_keys: None, enable_id_lists: opts.enable_id_lists, enable_dcs_deltas: opts.enable_dcs_deltas, id_lists_url: opts.id_lists_url.clone(),