From 51459078f38c851bb750d84ab9be4d8f40dc7693 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 23 Jun 2023 20:03:35 -0700 Subject: [PATCH 1/5] Delete unneeded conditional on preserve_order steps in CI Obsoleted by 4b9699612f57512b6734b43238c2382186245b31. --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7603eab60..bc74a5111 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,9 +61,7 @@ jobs: - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,arbitrary_precision - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value - run: cargo check --features preserve_order - if: matrix.rust != '1.53.0' && matrix.rust != '1.46.0' && matrix.rust != '1.45.0' && matrix.rust != '1.40.0' && matrix.rust != '1.38.0' && matrix.rust != '1.36.0' - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,preserve_order - if: matrix.rust != '1.53.0' && matrix.rust != '1.46.0' && matrix.rust != '1.45.0' && matrix.rust != '1.40.0' && matrix.rust != '1.38.0' && matrix.rust != '1.36.0' - name: Build without std run: cargo check --manifest-path tests/crate/Cargo.toml --target ${{matrix.target}} --no-default-features --features alloc if: matrix.target From e09d78f793b1fd189bf5ed59251ea906feb24df3 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 23 Jun 2023 20:05:18 -0700 Subject: [PATCH 2/5] Update indexmap dependency used for preserve_order feature to version 2 --- .github/workflows/ci.yml | 4 +++- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc74a5111..03cd3ae48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - rust: [beta, 1.56.1] + rust: [beta, 1.64.0, 1.56.1] os: [ubuntu] include: - rust: stable @@ -61,7 +61,9 @@ jobs: - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,arbitrary_precision - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value - run: cargo check --features preserve_order + if: matrix.rust != '1.56.1' - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,preserve_order + if: matrix.rust != '1.56.1' - name: Build without std run: cargo check --manifest-path tests/crate/Cargo.toml --target ${{matrix.target}} --no-default-features --features alloc if: matrix.target diff --git a/Cargo.toml b/Cargo.toml index 09fb908ca..5f1ad071e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rust-version = "1.36" [dependencies] serde = { version = "1.0.100", default-features = false } -indexmap = { version = "1.5.2", features = ["std"], optional = true } +indexmap = { version = "2", optional = true } itoa = "1.0" ryu = "1.0" From d4c98d05b993de5add76feec4eb371b1035d8f77 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 23 Jun 2023 20:51:14 -0700 Subject: [PATCH 3/5] Move serde_json_test crate to own workspace Fixes the following error when testing against a compiler older than 1.64: error: failed to select a version for the requirement `hashbrown = "^0.14"` candidate versions found which didn't match: 0.13.2, 0.13.1, 0.12.3, ... location searched: crates.io index required by package `indexmap v2.0.0` ... which satisfies dependency `indexmap = "^2"` of package `serde_json v1.0.97` ... which satisfies path dependency `serde_json` of package `serde_json_test v0.0.0` --- .github/workflows/ci.yml | 2 +- Cargo.toml | 3 --- fuzz/Cargo.toml | 2 -- tests/crate/Cargo.toml | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03cd3ae48..6c3972a60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,5 +121,5 @@ jobs: steps: - uses: actions/checkout@v3 - uses: dtolnay/install@cargo-outdated - - run: cargo outdated --workspace --exit-code 1 + - run: cargo outdated --exit-code 1 - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1 diff --git a/Cargo.toml b/Cargo.toml index 5f1ad071e..af0c3047e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,9 +28,6 @@ serde_derive = "1.0" serde_stacker = "0.1" trybuild = { version = "1.0.49", features = ["diff"] } -[workspace] -members = ["tests/crate"] - [lib] doc-scrape-examples = false diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 8e925bf94..5fe38b679 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -17,5 +17,3 @@ name = "from_slice" path = "fuzz_targets/from_slice.rs" test = false doc = false - -[workspace] diff --git a/tests/crate/Cargo.toml b/tests/crate/Cargo.toml index 6a3ac7034..739149fd2 100644 --- a/tests/crate/Cargo.toml +++ b/tests/crate/Cargo.toml @@ -15,7 +15,7 @@ serde_json = { path = "../..", default-features = false } default = ["std"] std = ["serde_json/std"] alloc = ["serde_json/alloc"] -preserve_order = ["serde_json/preserve_order"] +#preserve_order = ["serde_json/preserve_order"] arbitrary_precision = ["serde_json/arbitrary_precision"] raw_value = ["serde_json/raw_value"] unbounded_depth = ["serde_json/unbounded_depth"] From 706fc2b5592f415329d17df7b3777b56af909413 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 23 Jun 2023 20:56:24 -0700 Subject: [PATCH 4/5] Do all CI builds with old rustc using shim crate Fixes the following error when testing against a compiler older than 1.64: error: failed to select a version for the requirement `hashbrown = "^0.14"` candidate versions found which didn't match: 0.13.2, 0.13.1, 0.12.3, ... location searched: crates.io index required by package `indexmap v2.0.0` ... which satisfies dependency `indexmap = "^2"` of package `serde_json v1.0.97` ... which satisfies path dependency `serde_json` of package `serde_json_test v0.0.0` --- .github/workflows/ci.yml | 14 +++++++------- tests/crate/Cargo.toml | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c3972a60..92cacf5bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,17 +52,17 @@ jobs: with: toolchain: ${{matrix.rust}} targets: ${{matrix.target}} - - run: cargo check - - run: cargo check --features float_roundtrip - - run: cargo check --features arbitrary_precision - - run: cargo check --features raw_value - - run: cargo check --features unbounded_depth + - run: cargo check --manifest-path tests/crate/Cargo.toml + - run: cargo check --manifest-path tests/crate/Cargo.toml --features float_roundtrip + - run: cargo check --manifest-path tests/crate/Cargo.toml --features arbitrary_precision + - run: cargo check --manifest-path tests/crate/Cargo.toml --features raw_value + - run: cargo check --manifest-path tests/crate/Cargo.toml --features unbounded_depth - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,arbitrary_precision - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,raw_value - - run: cargo check --features preserve_order + - run: cargo check --manifest-path tests/crate/Cargo.toml --features serde_json/preserve_order if: matrix.rust != '1.56.1' - - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,preserve_order + - run: cargo check --manifest-path tests/crate/Cargo.toml --no-default-features --features alloc,serde_json/preserve_order if: matrix.rust != '1.56.1' - name: Build without std run: cargo check --manifest-path tests/crate/Cargo.toml --target ${{matrix.target}} --no-default-features --features alloc diff --git a/tests/crate/Cargo.toml b/tests/crate/Cargo.toml index 739149fd2..03fde9c44 100644 --- a/tests/crate/Cargo.toml +++ b/tests/crate/Cargo.toml @@ -16,6 +16,7 @@ default = ["std"] std = ["serde_json/std"] alloc = ["serde_json/alloc"] #preserve_order = ["serde_json/preserve_order"] +float_roundtrip = ["serde_json/float_roundtrip"] arbitrary_precision = ["serde_json/arbitrary_precision"] raw_value = ["serde_json/raw_value"] unbounded_depth = ["serde_json/unbounded_depth"] From ba29a89a098dd5db6e889830bf1ac33837c1416e Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 23 Jun 2023 21:10:47 -0700 Subject: [PATCH 5/5] Release 1.0.98 --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index af0c3047e..2efe47f61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serde_json" -version = "1.0.97" # remember to update html_root_url +version = "1.0.98" # remember to update html_root_url authors = ["Erick Tryzelaar ", "David Tolnay "] categories = ["encoding", "parser-implementations", "no-std"] description = "A JSON serialization file format" diff --git a/src/lib.rs b/src/lib.rs index af60a727b..2bca0bc6e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -300,7 +300,7 @@ //! [macro]: crate::json //! [`serde-json-core`]: https://github.com/rust-embedded-community/serde-json-core -#![doc(html_root_url = "https://docs.rs/serde_json/1.0.97")] +#![doc(html_root_url = "https://docs.rs/serde_json/1.0.98")] // Ignored clippy lints #![allow( clippy::collapsible_else_if,