Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature gate arbitrary-precision from serde_json #18917

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,15 @@ serial_test = "2.0.0"
serde = { version = "1.0.144", features = ["derive", "rc"] }
serde-name = "0.2.1"
serde-reflection = "0.3.6"
# The `arbitrary-precision` feature for `serde_json` shouldn't be enabled on
# workspace-level because of the known bugs
# - https://github.com/serde-rs/serde/issues/1183
# - https://github.com/serde-rs/json/issues/505
# - https://github.com/paupino/rust-decimal/issues/602
# which could lead to issues downstream. Instead, it should be feature-gated on
# crate-level.
serde_json = { version = "1.0.95", features = [
"preserve_order",
"arbitrary_precision",
] }
serde_repr = "0.1"
serde_test = "1.0.147"
Expand Down
3 changes: 3 additions & 0 deletions crates/sui-analytics-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ tap.workspace = true
[[bin]]
name = "sui-analytics-indexer"
path = "src/main.rs"

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-aws-orchestrator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ tempfile = "3.6.0"
[[bin]]
name = "sui-aws-orchestrator"
path = "src/main.rs"

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ typed-store.workspace = true

[features]
benchmark = ["narwhal-node/benchmark"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-bridge-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ serde_json.workspace = true
telemetry-subscribers.workspace = true
reqwest.workspace = true
futures.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ sui-test-transaction-builder.workspace = true
test-cluster.workspace = true
hex-literal = "0.3.4"
maplit = "1.0.2"

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui-cluster-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ move-core-types.workspace = true
default = ["postgres-feature"]
postgres-feature = ["diesel/postgres", "diesel/postgres_backend"]
pg_integration = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,4 @@ harness = false

[features]
test-utils = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-data-ingestion-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ sui-rest-api.workspace = true
[dev-dependencies]
rand.workspace = true
sui-types = { workspace = true, features = ["test-utils"] }

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-data-ingestion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ url.workspace = true
rand.workspace = true
tempfile.workspace = true
sui-types = { workspace = true, features = ["test-utils"] }

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
5 changes: 4 additions & 1 deletion crates/sui-e2e-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ passkey-client.workspace = true
passkey-authenticator.workspace = true
coset.workspace = true
url.workspace = true
p256.workspace = true
p256.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-framework-snapshot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ sui-types.workspace = true

[dev-dependencies]
tokio = { workspace = true, features = ["full"] }

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-graphql-rpc-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ reqwest.workspace = true
serde_json.workspace = true
sui-graphql-rpc-headers.workspace = true
thiserror.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui-graphql-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ default = ["pg_backend", "postgres-feature"]
postgres-feature = ["diesel/postgres", "diesel/postgres_backend"]
pg_integration = []
pg_backend = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pg_integration = []
default = ["postgres-feature"]
postgres-feature = ["diesel/postgres", "diesel/postgres_backend", "diesel-derive-enum/postgres"]
mysql-feature = ["diesel/mysql", "diesel/mysql_backend", "diesel-derive-enum/mysql"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]

[dev-dependencies]
sui-keys.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/sui-json-rpc-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ sui-types = { workspace = true, features = ["test-utils"] }

[features]
test-utils = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-json-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ mockall.workspace = true
expect-test.workspace = true
sui-types = { workspace = true, features = ["test-utils"] }
telemetry-subscribers.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-keys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ regex.workspace = true

[dev-dependencies]
tempfile.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
2 changes: 2 additions & 0 deletions crates/sui-light-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ move-binary-format.workspace = true
sui-json-rpc-types.workspace = true
sui-package-resolver.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui-move/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ prove = []
unit_test = ["build", "dep:once_cell"]
calibrate = []
all = ["build", "coverage", "disassemble", "prove", "unit_test", "calibrate"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-open-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ move-core-types.workspace = true
name = "generate-json-rpc-spec"
path = "src/generate_json_rpc_spec.rs"
test = false

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-package-resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ move-compiler.workspace = true
serde_json.workspace = true
sui-move-build.workspace = true
tower.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ sui-types = { workspace = true, features = ["test-utils"] }

[build-dependencies]
prost-build.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-replay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ sui-sdk.workspace = true
sui-storage.workspace = true
sui-transaction-checks.workspace = true
sui-types.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
4 changes: 3 additions & 1 deletion crates/sui-rest-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ sui-types.workspace = true
mysten-network.workspace = true
sui-protocol-config.workspace = true


[dev-dependencies]
diffy = "0.3"

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-rosetta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ test-cluster.workspace = true
tempfile.workspace = true
rand.workspace = true
reqwest.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-rpc-loadgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ test-cluster.workspace = true
[[bin]]
name = "sui-rpc-loadgen"
path = "src/main.rs"

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
4 changes: 4 additions & 0 deletions crates/sui-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ futures-core.workspace = true
futures.workspace = true
rand.workspace = true

[features]
default = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]

[[example]]
name = "coin_read_api"
path = "examples/coin_read_api.rs"
Expand Down
3 changes: 3 additions & 0 deletions crates/sui-security-watchdog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ uuid.workspace = true
lexical-util = "0.8.5"
reqwest = { workspace = true, features = ["json"] }
env_logger = "0.11.3"

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-single-node-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ tracing.workspace = true
sui-macros.workspace = true
sui-protocol-config.workspace = true
sui-simulator.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-snapshot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ serde_json.workspace = true

[dev-dependencies]
tempfile.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ sui-test-transaction-builder.workspace = true
sui-types = { workspace = true, features = ["test-utils"] }
sui-macros = { workspace = true }
sui-simulator = { workspace = true }

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ sui-storage.workspace = true
sui-types.workspace = true
sui-archival.workspace = true
bin-version.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/sui-transactional-test-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ typed-store.workspace = true

[target.'cfg(msim)'.dependencies]
msim.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ gas-profiler = [
"move-vm-test-utils/gas-profiler",
]
fuzzing = ["move-core-types/fuzzing"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions crates/sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ gas-profiler = [
"sui-execution/gas-profiler",
]
indexer = ["dep:sui-indexer", "dep:sui-graphql-rpc"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/suins-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ mysten-service.workspace = true
rand.workspace = true
tempfile.workspace = true
sui-types = { workspace = true, features = ["test-utils"] }

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions crates/suiop-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ tracing.workspace = true

[dev-dependencies]
tempfile.workspace = true

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
2 changes: 2 additions & 0 deletions external-crates/move/crates/move-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ datatest-stable.workspace = true
name = "ide_testsuite"
harness = false

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions external-crates/move/crates/move-binary-format/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ serde_json.workspace = true
default = []
fuzzing = ["proptest", "proptest-derive", "arbitrary", "move-core-types/fuzzing"]
wasm = ["getrandom"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions external-crates/move/crates/move-compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ datatest-stable.workspace = true
[[test]]
name = "move_check_testsuite"
harness = false

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions external-crates/move/crates/move-core-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ arbitrary = { workspace = true, features = ["derive_arbitrary"] }
[features]
default = []
fuzzing = ["proptest", "proptest-derive", "arbitrary"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions external-crates/move/crates/move-ir-compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ bcs.workspace = true

[features]
default = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions external-crates/move/crates/move-symbol-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ serde_json.workspace = true

[features]
default = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
1 change: 1 addition & 0 deletions external-crates/move/crates/move-vm-profiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ move-vm-config.workspace = true

[features]
gas-profiler = ["move-vm-config/gas-profiler"]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
3 changes: 3 additions & 0 deletions narwhal/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ rand.workspace = true
tempfile.workspace = true

test-utils = { path = "../test-utils", package = "narwhal-test-utils" }

[features]
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]
2 changes: 2 additions & 0 deletions narwhal/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ bcs.workspace = true

[features]
default = []
serde-arbitrary-precision = ["serde_json/arbitrary_precision"]

[dev-dependencies]
bincode.workspace = true
criterion.workspace = true
Expand Down
Loading