From 2836aecd750c0160a139b418c23b334276986c2f Mon Sep 17 00:00:00 2001 From: James Gilles Date: Mon, 14 Oct 2024 16:04:10 -0400 Subject: [PATCH] Bump serde_json version and add arbitrary_precision feature. This allows passing u128 through serde_json::Value, which is done in the CLI crate. --- Cargo.toml | 2 +- crates/cli/src/subcommands/subscribe.rs | 1 + crates/lib/proptest-regressions/address.txt | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 crates/lib/proptest-regressions/address.txt diff --git a/Cargo.toml b/Cargo.toml index 55aa4a2ebc..c24a56d429 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -203,7 +203,7 @@ scopeguard = "1.1.0" second-stack = "0.3" sendgrid = "0.21" serde = { version = "1.0.136", features = ["derive"] } -serde_json = { version = "1.0.87", features = ["raw_value"] } +serde_json = { version = "1.0.128", features = ["raw_value", "arbitrary_precision"] } serde_path_to_error = "0.1.9" serde_with = { version = "3.3.0", features = ["base64", "hex"] } serial_test = "2.0.0" diff --git a/crates/cli/src/subcommands/subscribe.rs b/crates/cli/src/subcommands/subscribe.rs index 3fa3f6c7c3..39155a54fa 100644 --- a/crates/cli/src/subcommands/subscribe.rs +++ b/crates/cli/src/subcommands/subscribe.rs @@ -99,6 +99,7 @@ fn reformat_update<'a>( let table_ty = schema.typespace.resolve(table_schema.product_type_ref); let reformat_row = |row: &str| -> anyhow::Result { + // TODO: can the following two calls be merged into a single call to reduce allocations? let row = serde_json::from_str::(row)?; let row = serde::de::DeserializeSeed::deserialize(SeedWrapper(table_ty), row)?; let row = table_ty.with_value(&row); diff --git a/crates/lib/proptest-regressions/address.txt b/crates/lib/proptest-regressions/address.txt new file mode 100644 index 0000000000..ef4feadfc4 --- /dev/null +++ b/crates/lib/proptest-regressions/address.txt @@ -0,0 +1,7 @@ +# Seeds for failure cases proptest has generated in the past. It is +# automatically read and these particular cases re-run before any +# novel cases are generated. +# +# It is recommended to check this file in to source control so that +# everyone who runs the test benefits from these saved cases. +cc 4dc1661cd0b78ee7036f894d2c7cf52955f05e41bb0322095ec00edf9b6fca77 # shrinks to val = 18446744073709551616