-
Notifications
You must be signed in to change notification settings - Fork 717
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
Updated examples and README.md #678
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. There are some MSRV errors
Cargo.toml
Outdated
@@ -50,10 +50,14 @@ secp256k1 = { version = "0.20.0", features = [ "recovery", "rand-std" ] } | |||
bincode = "1.3.1" | |||
# We need to pin ryu (transitive dep from serde_json) to stay compatible with Rust 1.22.0 | |||
ryu = "<1.0.5" | |||
base64-compat = "1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here? I don't see it used anywhere in the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples/psbt.rs file needed it to use base64::decode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, I didn't click that base64-compat
had the lib name set to base64
. Thanks
Cargo.toml
Outdated
@@ -50,10 +50,14 @@ secp256k1 = { version = "0.20.0", features = [ "recovery", "rand-std" ] } | |||
bincode = "1.3.1" | |||
# We need to pin ryu (transitive dep from serde_json) to stay compatible with Rust 1.22.0 | |||
ryu = "<1.0.5" | |||
base64-compat = "1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, I didn't click that base64-compat
had the lib name set to base64
. Thanks
@sanket1729 are we still getting MSRV errors? The tests are passing for me locally. |
damn. looking into it. any idea what I need, to be able to catch this error when I run contrib/test.sh locally? |
@tcharding I hadn't noticed base64 as a feature. Enabling it under [[example]] in Cargo.toml was enough without adding the dev-dependency. |
@sanket1729 Sorry this required so many CI runs. After some digging I think adding I need some help on downgrading rustc to 1.29.0 to be able to run these tests locally and ensure backwards compatability. Been at it for a while now and been getting an Addition: I will also document this in the README once I figure it out so anyone making PR's in the future can easily test with v1.29.0 and prevent having to rely on CI for it. Its a little more complicated than it seems. The issue I'm having was reported here: rust-lang/cargo#6113; the solutions suggested do not work for us. |
Having the same issue with rust-bitcoin/rust-miniscript#277. To downgrade to 1.29 run |
@mcroad I did that. But that leads to a bunch of other errors. |
@mcroad Just saw your issue on rust-miniscript. I get the same error here but with the cc crate. Will try out a few things tomorrow and get back. |
@i5hi make sure to pin the cc dependency as described in the readme https://github.com/rust-bitcoin/rust-bitcoin#minimum-supported-rust-version-msrv |
Aww man :/ Thats awkward :P Last time I attemtped this, I did run those pin commands and still got errors. Noticed that if I ran |
All good now. Cheers @mcroad! |
Final changes to this PR are complete.
*edits |
94aee4e
to
d4fe1fe
Compare
Added --features base64 to the new psbt example in contrib/test.sh which was failing the last CI run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you and congrats with a first-time contribution!
I left few code nits and changes to README. Unfortunately you need to rebase on top of master and remove merge commit - we do not accept from-master merges in the history. Also, it is required that each of the commits compile successfully. Sorry for inconvenience, but this is a maintainer requirement applied to all PRs in this repo.
README.md
Outdated
@@ -61,6 +61,10 @@ please join us in | |||
|
|||
This library should always compile with any combination of features on **Rust 1.29**. | |||
|
|||
``` | |||
rustup default 1.29.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether its good to ask user to change the default rust version - especially with the fact that it will compile with any version above that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this to help a contributor test with MSRV. Maybe add a note saying "To test with MSRV..." ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For testing I would prefer something like rustup install 1.29.0 && cargo +1.29.0 build
, which will not switch the global rust environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, just default
subcommand also assumes 1.29.0 is already installed.
README.md
Outdated
@@ -79,6 +83,8 @@ For the feature `base64` to work with 1.29.0 we also need to pin `byteorder`: | |||
cargo update -p byteorder --precise "1.3.4" | |||
``` | |||
|
|||
*If you face a `Cargo.lock` parsing error, remove it before running the above commands.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or do cargo generate-lockfile
Thanks for the support @dr-orlovsky Will fix this up to meet all the mentioned requirements and also address the nits you've mentioned. |
Hi @i5hi, are you working on this PR still mate? |
Hey. Yes. I will re-review, update and try to close it by the end of November. |
Awesome, thanks man! |
oh snap, i broke it while trying to sync up. Will make a new PR. |
Added examples/psbt.rs
Updated error message for examples/bip32.rs.
The previous error would print the entire path as follows: