-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix msrv: Run msrv checks with minimal versions #425
Conversation
Since it is possible to for dependencies to bump MSRV in patch release, msrv checking should use the minimal versions supported by flate2. Users cares deeply about msrv can also pin them to the minimal versions to maintain their current msrv. This would have also help discover bugs in rust-lang#424
Oh, right:
The MSRV is only valid for the C bindings, not for |
Thanks removed it |
It can finally reproduce the error 🎉 |
Let me put my commit in and bump the crate version… |
I disagree here. The Increasing the |
To clarify some more, the problem with
Essentially If we raise the |
Thanks for the clarification, very insightful! |
AIUI, what we are looking for here is to check that all features work when the MSRV (as defined by option 3 above) is used? I think that could exist as a separate task. The problem is that since the MSRV is current release - 1, then every 6 weeks we need to modify the workflow to update the compiler version. It might work if we say the MSRV is 1.79 and then only update it when we feel like it, or when a dependency breaks CI. |
Actually it's the smallest possible version that is still able to build the core features (i.e. without But you are absolutely right to ask under which circumstances this setup would break - in theory it does so only if this crate changes, as dependencies would be stuck at their minimal versions. Maybe there should also be a forward-facing version of this task that tests with the latest dependencies - after all, these would be what truly can affect the typically possible MSRV. I hope that makes some sense, and I am writing this thinking that I was probably missing some or all of your point :/. |
@Byron Opened rust-lang/libz-sys#207 |
My main concern is that the A user who happens to be stuck on Rust 1.56.1 can currently add Now, if this user adds a backend feature, they will need This change seems to be because users of |
Well that's impossible. cc has a msrv of 1.63, same as debian. The reason we keep 1.63 is because of complaints from users, otherwise we would bump to newer rustc already. Previously we tried bumping it to 1.65/1.66c and gets pushed back, that's probably why you had experience of a reduction in msrv, it's actually a revert of msrv bump we did. P.S. I'm co-maintainer of cc |
BTW for cc we really want to bump the msrv to drop some code and use some new features. |
@NobodyXu Not suggesting that |
For the zlib-ng-cc part, I think cc is the only dependency? In that case I suppose it's pretty easy to track.
I love the idea that cargo automatically selects one that fits in my msrv, but unfortunately they aren't ready yet. |
…test releases. That way, those compiling with `-Zminimal-versions` have higher chances of it to work. See GitoxideLabs/gitoxide#1541 for reference.
That way it should compile with minimal versions. Reason for this is the following: ```` error: package `cc v1.0.98` cannot be built because it requires rustc 1.63 or newer, while the currently active rustc version is 1.56.1 ```` Note that the expressed MSRV is still a lower one as it may work for some people that use different settings and/or configuration.
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.
Great, it works now!
@jongiddy Please note that only the tested MSRV was increased to 1.63, the claimed one is unchanged. Thus I would expect that there is no issue downstream.
@Byron We should keep the original minimum test as well, as we need to know when a PR uses a compiler feature that needs |
Strange, I am not seeing how this isn't covered particularly well now. But I agree, ideally nothing gets lost with these changes. In any case, maybe you want to submit a PR for getting that test back and then I will probably see what I am missing right away. |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [flate2](https://togithub.com/rust-lang/flate2-rs) | workspace.dependencies | patch | `1.0.31` -> `1.0.33` | | [prettyplease](https://togithub.com/dtolnay/prettyplease) | workspace.dependencies | patch | `0.2.20` -> `0.2.22` | | [quote](https://togithub.com/dtolnay/quote) | workspace.dependencies | patch | `1.0.36` -> `1.0.37` | | [serde](https://serde.rs) ([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies | patch | `1.0.208` -> `1.0.209` | | [serde_json](https://togithub.com/serde-rs/json) | workspace.dependencies | patch | `1.0.125` -> `1.0.127` | --- ### Release Notes <details> <summary>rust-lang/flate2-rs (flate2)</summary> ### [`v1.0.33`](https://togithub.com/rust-lang/flate2-rs/releases/tag/1.0.33): - fix minimal manifest versions [Compare Source](https://togithub.com/rust-lang/flate2-rs/compare/1.0.32...1.0.33) #### What's Changed - Fix msrv: Run msrv checks with minimal versions by [@​NobodyXu](https://togithub.com/NobodyXu) in [https://github.com/rust-lang/flate2-rs/pull/425](https://togithub.com/rust-lang/flate2-rs/pull/425) #### New Contributors - [@​NobodyXu](https://togithub.com/NobodyXu) made their first contribution in [https://github.com/rust-lang/flate2-rs/pull/425](https://togithub.com/rust-lang/flate2-rs/pull/425) **Full Changelog**: rust-lang/flate2-rs@1.0.32...1.0.33 ### [`v1.0.32`](https://togithub.com/rust-lang/flate2-rs/releases/tag/1.0.32): - turn panic into error [Compare Source](https://togithub.com/rust-lang/flate2-rs/compare/1.0.31...1.0.32) #### What's Changed ##### Fix - Return error instead of packing on Z_MEM_ERROR by [@​crazymerlyn](https://togithub.com/crazymerlyn) in [https://github.com/rust-lang/flate2-rs/pull/423](https://togithub.com/rust-lang/flate2-rs/pull/423) ##### Other - prepare new release by [@​Byron](https://togithub.com/Byron) in [https://github.com/rust-lang/flate2-rs/pull/416](https://togithub.com/rust-lang/flate2-rs/pull/416) - update miniz_oxide dependency to 0.8.x by [@​oyvindln](https://togithub.com/oyvindln) in [https://github.com/rust-lang/flate2-rs/pull/420](https://togithub.com/rust-lang/flate2-rs/pull/420) - update maintenance guide with recent news by [@​Byron](https://togithub.com/Byron) in [https://github.com/rust-lang/flate2-rs/pull/419](https://togithub.com/rust-lang/flate2-rs/pull/419) - Check minimal version of Rust that compiles by [@​jongiddy](https://togithub.com/jongiddy) in [https://github.com/rust-lang/flate2-rs/pull/421](https://togithub.com/rust-lang/flate2-rs/pull/421) - Remove non-existent build in CI by [@​jongiddy](https://togithub.com/jongiddy) in [https://github.com/rust-lang/flate2-rs/pull/422](https://togithub.com/rust-lang/flate2-rs/pull/422) #### New Contributors - [@​crazymerlyn](https://togithub.com/crazymerlyn) made their first contribution in [https://github.com/rust-lang/flate2-rs/pull/423](https://togithub.com/rust-lang/flate2-rs/pull/423) **Full Changelog**: rust-lang/flate2-rs@1.0.31...1.0.32 </details> <details> <summary>dtolnay/prettyplease (prettyplease)</summary> ### [`v0.2.22`](https://togithub.com/dtolnay/prettyplease/releases/tag/0.2.22) [Compare Source](https://togithub.com/dtolnay/prettyplease/compare/0.2.21...0.2.22) - Support formatting precise capture `use<>` syntax ([#​80](https://togithub.com/dtolnay/prettyplease/issues/80)) ### [`v0.2.21`](https://togithub.com/dtolnay/prettyplease/releases/tag/0.2.21) [Compare Source](https://togithub.com/dtolnay/prettyplease/compare/0.2.20...0.2.21) - Support formatting tail-call `become` expressions ([#​79](https://togithub.com/dtolnay/prettyplease/issues/79)) </details> <details> <summary>dtolnay/quote (quote)</summary> ### [`v1.0.37`](https://togithub.com/dtolnay/quote/releases/tag/1.0.37) [Compare Source](https://togithub.com/dtolnay/quote/compare/1.0.36...1.0.37) - Implement ToTokens for CStr and CString ([#​283](https://togithub.com/dtolnay/quote/issues/283)) </details> <details> <summary>serde-rs/serde (serde)</summary> ### [`v1.0.209`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.209) [Compare Source](https://togithub.com/serde-rs/serde/compare/v1.0.208...v1.0.209) - Fix deserialization of empty structs and empty tuples inside of untagged enums ([#​2805](https://togithub.com/serde-rs/serde/issues/2805), thanks [@​Mingun](https://togithub.com/Mingun)) </details> <details> <summary>serde-rs/json (serde_json)</summary> ### [`v1.0.127`](https://togithub.com/serde-rs/json/releases/tag/1.0.127) [Compare Source](https://togithub.com/serde-rs/json/compare/1.0.126...1.0.127) - Add more removal methods to OccupiedEntry ([#​1179](https://togithub.com/serde-rs/json/issues/1179), thanks [@​GREsau](https://togithub.com/GREsau)) ### [`v1.0.126`](https://togithub.com/serde-rs/json/releases/tag/1.0.126) [Compare Source](https://togithub.com/serde-rs/json/compare/1.0.125...1.0.126) - Improve string parsing on targets that use 32-bit pointers but also have fast 64-bit integer arithmetic, such as aarch64-unknown-linux-gnu_ilp32 and x86\_64-unknown-linux-gnux32 ([#​1182](https://togithub.com/serde-rs/json/issues/1182), thanks [@​CryZe](https://togithub.com/CryZe)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 10am on monday" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Since it is possible to for dependencies to bump MSRV in patch release, msrv checking should use the minimal versions supported by flate2.
Users cares deeply about msrv can also pin them to the minimal versions to maintain their current msrv.
This would have also help discover bugs in #424