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

Pin dependencies when using MSRV #459

Merged
merged 2 commits into from
Sep 12, 2022
Merged
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: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions contrib/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@ 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

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
Expand Down