From 321d82ca5315b668578d737fa83c100201bc59f2 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Sat, 10 Aug 2024 07:22:37 +1000 Subject: [PATCH] hashes: Pin in extra_test Note: - The `extra_test.sh` script runs for all toolchains. - The `schemars` crate does not use the repo lock files. - We need to pin some deps when building the `schemars` test. Pin in the `extra_test.sh` script, and mention it in the docs so the docs don't go stale next MSRV update. This was previously unnoticed because of the `run_task` bug. ref: rust-bitcoin/rust-bitcoin-maintainer-tools#10 --- hashes/contrib/extra_tests.sh | 7 +++++++ hashes/extended_tests/schemars/README.md | 10 +++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hashes/contrib/extra_tests.sh b/hashes/contrib/extra_tests.sh index deea345b6..4a39a1f1b 100755 --- a/hashes/contrib/extra_tests.sh +++ b/hashes/contrib/extra_tests.sh @@ -5,5 +5,12 @@ set -euox pipefail REPO_DIR=$(git rev-parse --show-toplevel) pushd "$REPO_DIR/hashes/extended_tests/schemars" > /dev/null + +# This comment mentions Rust 1.63 to assist grepping when doing MSRV update. +# +if cargo --version | grep -q '1\.63'; then + cargo update -p regex --precise 1.7.3 +fi + cargo test popd > /dev/null diff --git a/hashes/extended_tests/schemars/README.md b/hashes/extended_tests/schemars/README.md index 51dc97c42..e93cd0b0a 100644 --- a/hashes/extended_tests/schemars/README.md +++ b/hashes/extended_tests/schemars/README.md @@ -4,10 +4,6 @@ Run as usual with `cargo test`. ## Minimum Supported Rust Version (MSRV) -To run the tests with the MSRV you will need to pin `serde`: - -```bash -cargo update -p serde --precise 1.0.156 -cargo update -p regex --precise 1.7.3 -cargo update -p chrono --precise 0.4.24 -``` +To run the tests with the current MSRV you will need to pin some +dependencies. See the `hashes/contrib/extra_tests.sh` script for the +current list of pins.