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
Rust 2018 & MSRV bump 1.41.1 tracking issue #510
Comments
|
|
|
|
1.36 is also the (current, may change without major version bump) MSRV of |
Possibly this crate could be interesting for us https://crates.io/crates/standback |
mrust can compile rustc 1.39 now. https://www.reddit.com/r/rust/comments/mjxbaz/mrustc_upgrade_rustc_1390/ |
Nice! |
Any opposition to moving to 1.39 then for rust-bitcoin 0.27? I can open another discussion issue. cc @TheBlueMatt 1.29 is really old now and is causing us a lot of grief especially with respect to nostd/ |
Hmm, in general I think I'm fine with 1.39. It is less than two years old, though, so not sure if we don't want to use 1.34 (which is about two years old) or 1.36 (for alloc). I do admit it would be cool to go right to 1.39 and use async in a few places. |
I think we could wait for the beginning of July and then jump to 1.36 (which aside from being "the one with |
As for using async I think that'd be a major change, though I guess if it were localized maybe not. And the upcoming API overhaul + transition to Rust 2018 would already be major changes, and it might be good to stagger them. |
Right, I was mostly thinking of (optionally) using async in rust-bitcoincore-rpc by porting the lightning-block-sync stuff to there. |
yeah I don't think rust-bitcoin itself should be async, maybe when we have AsyncRead/AsyncWrite in libstd then we might want to add support for these in the Encode/Decode traits |
As for bumping, I can come up with a summary of what features we might want and what versions they exists in, |
Alright, lets plan on 1.36 Soon (tm), then. We may actually go ahead and do it in RL because we're already at 1.30 (due to cargo bug that prevented us from using 1.29) and I'm tired of trying to make cc work right. |
Debian is shipping 1.41 on oldstable and rust-bitcoin will likely move to 1.36 over the coming months, so there's little reason to wait on this. cc rust-bitcoin/rust-bitcoin#510
Debian is shipping 1.41 on oldstable and rust-bitcoin will likely move to 1.36 over the coming months, so there's little reason to wait on this. cc rust-bitcoin/rust-bitcoin#510
Upgrade to 1.36 actually means we can use I just completed development of a 1.31-compatible library simplifying creation of complex derivation macros to a big degree: https://docs.rs/amplify_syn/. You can see a sample of what it can be done with it here: https://github.com/LNP-BP/rust-amplify/blob/master/derive/src/lib.rs#L480-L553 Upon MSRV increase I will be happy to refactor rust-bitcoin code to introduce derivation macros using it (we already had one attempt in the past by @elichai, but then we were blocked by MSRV requirement). |
As of July 4 1.36 was two years old, so I think we can do this whenever now. https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html |
c60bf1e Fix edition-idioms (Tobin C. Harding) 08bce7a Update to use edition 2018 (Tobin C. Harding) 2a83fa0 Update MSRV in CI and Readme from 1.29 to 1.41.1 (Tobin C. Harding) 2b73bb2 integration_test: Use latest bitcoin release (Tobin C. Harding) Pull request description: Update the MSRV to Rust 1.41.1 and enable edition 2018. I'm not sure how we want to merge these MSRV PRs across the stack but here is the `rust-miniscript` one. Discussion: rust-bitcoin/rust-bitcoin#510 (comment) ACKs for top commit: sanket1729: ACK c60bf1e. redid the entire process to match the diff. Tree-SHA512: 353cd793df4ba91b897e0dc58547b074ade7c23e7d75447c957ba947a12ff72c4504cb46036fdffea1591e429ee9eb056182dcffc89e301c72e3c5c433e8de16
abb7c80 Bump version 0.10.0 -> 0.11.0 (Tobin Harding) b270023 Update to use edition 2018 (Tobin Harding) e762962 Update MSRV in CI and Readme from 1.29 to 1.41.1 (Tobin Harding) 3602c75 Remove trailing whitespace (Tobin Harding) Pull request description: Update the MSRV to Rustn 1.41.1 and enable edition 2018. Should not be merged without rust-bitcoin organization-wide planning on how to go about this upgrade. Discussion: rust-bitcoin/rust-bitcoin#510 (comment) This one is a bit more involved than the same PRs for [rust-bech32](rust-bitcoin/rust-bech32#57) or [rust-bitcoinconcensus](rust-bitcoin/rust-bitcoinconsensus#34). The commit message of patch 3: ``` Update to use edition 2018 Add `edition = "2018"` to the minifest file. In order to get the codebase to build cleanly do: - Remove usage of `use Hash as HashTrait`, instead use `impl crate::Hash for Hash` and `use Hash as _`. - Same for HashEngine (remove EngineTrait). - Add `crate::` to import statements and group same level (only did this for crate imports, the rest can wait for rustfmt :) - Make test imports uniform, elect to _not_ use `super::*` because it seems cleaner, we are always importing the module we are testing and the same set of traits in each `test` module. Can change if requested. ``` Thanks ACKs for top commit: apoelstra: ACK abb7c80 Tree-SHA512: 6e99235075a12a82bc2bb032411eb7d022c650e5288bd1a2891b3d863e093ad9398525c1fba41d5e3fdcb194fcf93b00c6f59ad7681f5404eaeae73f08af2278
Done in preparation for updating the MSRV across all the rust-bitcoin crates. For discussion see: rust-bitcoin/rust-bitcoin#510 (comment)
Done in preparation for updating the MSRV across all the rust-bitcoin crates. For discussion see: rust-bitcoin/rust-bitcoin#510 (comment)
ec6459e Bump version 0.19.0-3 -> 0.19.0-0.4.0 (Tobin Harding) 31c695f Update to use edition 2018 (Tobin Harding) 4be3bf2 Update MSRV in CI and Readme from 1.29 to 1.41.1 (Tobin Harding) Pull request description: Update the MSRV to Rust 1.41.1 and enable edition 2018. Should not be merged without rust-bitcoin organization-wide planning on how to go about this upgrade. ~Leaving as draft until rust-bitcoin Taproot release is done.~ Discussion: rust-bitcoin/rust-bitcoin#510 (comment) Top commit has no ACKs. Tree-SHA512: bf38d3884ccf5c151ee2956e4ee285ec778602792752fe696a2b56b5cbcb2d3e13b7eaed42517f6b1fb49a0db90ea946d58c124532f596e1f8ad649c61730f78
I've checked off all the basic ones crew, many of the others I either do not understand how to do or I do not understand the motivation behind doing them. If you put one on the list, and would like to see it implemented without having to do it yourself, please throw a comment here with a bit more context and I'm happy to do it. Thanks. |
Adding
|
I had a think about the |
Does anyone remember where |
I scratched |
@tcharding I think by
We can skip |
88ce8fe Match against an optional single trailing colon (Tobin C. Harding) Pull request description: Currently we allow multiple trailing colons when matching within the `check_format_non_negative` macro. We can be more restrictive with no loss of usability. Use `$(;)?` instead of `$(;)*` to match against 0 or 1 semi-colons instead of 0 or more. Done as part of the [edition 2018 checklist](#510). ACKs for top commit: Kixunil: ACK 88ce8fe apoelstra: ACK 88ce8fe Tree-SHA512: 4409c094f6a0aa49ddebdad850fd1d5a31a57dae8828f5a1db0ee5a855e1bce9e43aea69fa0b4d132068c3a43f1f62d35409b9ac5b32ed876e4dd586829e8e68
Cool, cheers. |
5d2f1ce Fix WASM build (Elichai Turkel) 39aaac6 Use new trait TryFrom and do small refactoring (Elichai Turkel) 7d3a149 Move more things from the std feature to the alloc feature (Elichai Turkel) bc8c713 Replace c_void with core::ffi::c_void (Elichai Turkel) 26a52bc Update secp256k1-sys to edition 2018 and fix imports (Elichai Turkel) ebe46a4 Update rand to 0.8 and replace CounterRng with mock::StepRng (Elichai Turkel) 626835f Update secp256k1 to edition 2018 and fix imports (Elichai Turkel) 67c0922 Update MSRV in CI and Readme from 1.29 to 1.41 (Elichai Turkel) Pull request description: As proposed in rust-bitcoin/rust-bitcoin#510 (comment) this PR raises the MSRV to 1.41.1 it also changes the code to be Edition 2018. The PR contains a few things: * Moving to edition 2018 and fixing the imports * Sorting and combining imports to make them more concise * Replacing our c_void with `core::ffi::c_void` * Bumping the `rand` version to latest and modifying our `RngCore` implementations accordingly * Doing some small refactoring and using the new `TryInto` trait where it makes the code nicer If people prefer I can split this PR into multiple and/or drop some commits ACKs for top commit: tcharding: ACK 5d2f1ce apoelstra: ACK 5d2f1ce Tree-SHA512: 5bf84e7ebb6286d59f8cada0bb712c46336f0dd6c35b67e6f4ba323b5484ad925b99b73e778ae4608f123938e7ee8705a0aec576cd9c065072c4ecf1248e3470
There are only a few things to go on the list.
|
Me and @Kixunil are maintainers of that repo hosted in a dedicated github org (@Kixunil contributed to other parts of the |
async - that was about adding support to async functions, for instance for implementing non-blocking consensus encoding/decoding with |
Exactly what @dr-orlovsky said. Those two are definitely not required for the issue to be complete and are more "nice to have" things that could be added at any time in the future. IMO it's even better to skip them to release more quickly. @tcharding I belive we already did |
Thanks fellas, The long and the short of it is then, to sum up, checklist is done after:
|
Ah, I got confused because I remembered that the PR was opened but forgot it was closed without replacement. |
My bad. |
The checklist is complete - closing. |
…e trailing colon 88ce8fe Match against an optional single trailing colon (Tobin C. Harding) Pull request description: Currently we allow multiple trailing colons when matching within the `check_format_non_negative` macro. We can be more restrictive with no loss of usability. Use `$(;)?` instead of `$(;)*` to match against 0 or 1 semi-colons instead of 0 or more. Done as part of the [edition 2018 checklist](rust-bitcoin/rust-bitcoin#510). ACKs for top commit: Kixunil: ACK 88ce8fe apoelstra: ACK 88ce8fe Tree-SHA512: 4409c094f6a0aa49ddebdad850fd1d5a31a57dae8828f5a1db0ee5a855e1bce9e43aea69fa0b4d132068c3a43f1f62d35409b9ac5b32ed876e4dd586829e8e68
— @apoelstra #373 (comment)
serde
crate/feature and prevents from using normal solutions like Replace feature serde with use-serde #373 (comment)syn
1.0 support like inamplify_derive
instead if hard-to-readimpl_
macro and multipleimpl From...
andimpl Display...
blocks (and there are wrapper types as well https://docs.rs/amplify_derive/2.0.6/amplify_derive/derive.Wrapper.html)#[non_exhaustive]
to solve the problem of breaking API changes with gated enum veriantsChecklist
async - probably only forThis is a nice to have, leave for another day.Read
andWrite
async equivalentsuse-serde
renamed toserde
#1006useThis is a nice to have, leave for another day.amplify_derive
? note that this will blow up compile times for non-serde usesTryFrom
and useTryInto
(Implement TryFrom #1007 doesTryFrom
but not theTryInto
bit)sort_by_cached_key
impl PartialOrd/Ord for PublicKey #524Add PublicKey::to_sort_key method for use with sorting by key #1084Usealloc
? Is this still relevant?Infallible
(Remove Uninhabited #1075)contains()
on ranges Add OP_CHECKSIGADD and OP_SUCCESSxxx #644 (comment) (Remove MSRV todo comments #952)chunks_exact()
instead ofchunks
(Remove MSRV todo comments #952)use Trait as _
(Remove unnecessaryWrite as _fmtWrite
#965)Exhaustive integer matching instead of comparing with zero(improves readability) (Match on specific integer values #1012)(;)?
instead of(;)*
in macros (Addamount::Display
- make formatting configurable #716) (Match against an optional single trailing colon #1010)literal
instead ofexpr
in macros (Addamount::Display
- make formatting configurable #716) (Use fragment-specifier literal #1014)trim_start_matches
instead oftrim_left_matches
(Remove MSRV todo comments #952)Vec::from([foo])
instead ofVec::new
followed byv.push()
. (Remove MSRV todo comments #952, I checked all instances ofmut foo = Vec::new()
and also the same forBTreeMap
)cause()
tosource()
in impl ofstd::error::Error
u16::to_be_bytes
instead ofswap_bytes
(Remove MSRV todo comments #952)#[non_exhaustive]
(Add non_exhaustive compiler directive toAddressType
#1011 and Add non_exhaustive to all error enums #1026)non_exhaustive
types:Error
(Add non_exhaustive to all error enums #1026)AddressType
(Add non_exhaustive compiler directive toAddressType
#1011)address::Payload
(Add non_exhaustive compiler directive toAddressType
#1011)LeafVersion
(Add non_exhaustive compiler directive toAddressType
#1011)PR list:
Edition 2018 #635closed in favour of 983The text was updated successfully, but these errors were encountered: