From 0e0dcb7f54a8403f21912f777ec800047821aa0c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 12 Jul 2023 15:55:55 +1000 Subject: [PATCH] CI: Pin dependencies required for MSRV build Whinge, whinge, whinge, and pin the dependencies. --- contrib/test.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/test.sh b/contrib/test.sh index 22b529d..8cf87a5 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -19,6 +19,13 @@ cargo test -- --ignored --exact 'tests::test_panic_raw_ctx_should_terminate_abno # Make all cargo invocations verbose export CARGO_TERM_VERBOSE=true +# Pin dependencies as required if we are using MSRV toolchain. +if cargo --version | grep "1\.48"; then + # 1.0.157 uses syn 2.0 which requires edition 2021 + cargo update -p serde_json --precise 1.0.99 + cargo update -p serde --precise 1.0.156 +fi + # Defaults / sanity checks cargo build --all cargo test --all