diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml new file mode 100644 index 00000000..4d554abd --- /dev/null +++ b/.github/workflows/build-check.yml @@ -0,0 +1,36 @@ +name: build-check + +on: + pull_request: + push: + branches: [main] + +concurrency: + group: build-check-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + cargo-build: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: dtolnay/rust-toolchain@stable + + - name: Install protoc + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler + + # The cdylib `statsig_ffi` is what figma-release.yml ships. Building it + # transitively builds statsig-rust. Compile errors in either crate fail + # the PR before merge — catches things like the missing-field bug we + # hit in PR #7 (added a field to StatsigOptions but missed an + # exhaustive struct literal in statsig-ffi). + - name: cargo build --release -p statsig_ffi + env: + STATSIG_BUILD_PROTO: true + run: cargo build --release -p statsig_ffi 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(),