From 15b57cd9b5d0a8f02e3762f4371189ee0252ce7f Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 12 Sep 2022 10:28:21 +1000 Subject: [PATCH 1/2] Remove TOOLCHAIN Cargo already uses an env var to configure the toolchain `RUSTUP_TOOLCHAIN`, there is no need for our custom `TOOLCHAIN` environment variable. --- contrib/test.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/contrib/test.sh b/contrib/test.sh index 784061613..54541533b 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -4,12 +4,6 @@ set -e FEATURES="compiler serde rand" -# Use toolchain if explicitly specified -if [ -n "$TOOLCHAIN" ] -then - alias cargo="cargo +$TOOLCHAIN" -fi - cargo update -p serde --precise 1.0.142 cargo update -p serde_derive --precise 1.0.142 From c6d89cd910af787c7f12f139713bba2c7662e07f Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 12 Sep 2022 10:31:29 +1000 Subject: [PATCH 2/2] Pin dependencies when using MSRV A recent release of `form_urlencoded` breaks our dev build when using 1.41.1 toolchain. Pin the `url` and `form_urlencoded` dependencies when on 1.41.1 toolchain. --- README.md | 8 ++++++++ contrib/test.sh | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.md b/README.md index f7cd476d9..e5294eb33 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,14 @@ or in [the `examples/` directory](https://github.com/apoelstra/rust-miniscript/t This library should always compile with any combination of features (minus `no-std`) on **Rust 1.41.1** or **Rust 1.47** with `no-std`. +Some dependencies do not play nicely with our MSRV, if you are running the tests +you may need to pin as follows: + +``` +cargo update --package url --precise 2.2.2 +cargo update --package form_urlencoded --precise 1.0.1 +``` + ## Contributing Contributions are generally welcome. If you intend to make larger changes please discuss them in an issue before PRing them to avoid duplicate work and diff --git a/contrib/test.sh b/contrib/test.sh index 54541533b..4c3aa0749 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -10,6 +10,18 @@ cargo update -p serde_derive --precise 1.0.142 cargo --version rustc --version +# Work out if we are using a nightly toolchain. +MSRV=false +if cargo --version | grep "1\.41\.0"; then + MSRV=true +fi + +# form_urlencoded 1.1.0 breaks MSRV. +if [ "$MSRV" = true ]; then + cargo update -p url --precise 2.2.2 + cargo update -p form_urlencoded --precise 1.0.1 +fi + # Format if told to if [ "$DO_FMT" = true ] then