-
Notifications
You must be signed in to change notification settings - Fork 964
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
build(deps): Bump rand to 0.8 and quickcheck to 1 #2857
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.
Thank you! This is something that has been overdue for a while!
Ready for review! @thomaseizinger thank you for helping me with this. |
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 for pushing this forward!
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
So I added an implementation of - match g.gen_range(0..5) {
+ match g.gen_range(0..5u8) {
0 => Message::Header(HeaderLine::V1),
1 => Message::NotAvailable,
2 => Message::ListProtocols, I added a T: Unsigned bound to catch this kind of errors at compile time. |
Also this is a very strange failed test https://github.com/libp2p/rust-libp2p/runs/8207467155?check_suite_focus=true, issued in #2874. |
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.
LGTM!
@mxinden Can you have a look at this too?
Excuse the bad merge commit, I've fixed the build error in 25f87c5. |
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.
Solid work. Thanks @kpp for solving this long standing issue in such a clean way.
@mxinden I bumped the versions of crates and added CHANGELOG entries. pnet changelog should reflect the date of publishing. |
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.
Thanks for the follow ups. Still a couple of comments. Keeping the libp2p-kad
tests deterministic would ease debugging in the future by a lot.
Co-authored-by: Max Inden <mail@max-inden.de>
@mxinden I made kad tests deterministic. |
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.
LGTM!
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.
This is good to merge from my side. Thank you @kpp!
I think the only open point is #2857 (comment), plus there is now a merge conflict with master.
All comments are resolved and tests are passing. Going ahead with merging this. Interoperability tests fail because of libp2p/test-plans#41. |
Fixes #2847
Fixes #2732
It would be nice if you can help me with or at least give an advise:
Some tests failI didn't implement my own gen_range but used modulus insteadThere is a lot of leaky abstractions ofrand
inkad