Skip to content

[RFE] Select a MSRV #93

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

Closed
jeremycline opened this issue Jun 26, 2024 · 2 comments · Fixed by #94
Closed

[RFE] Select a MSRV #93

jeremycline opened this issue Jun 26, 2024 · 2 comments · Fixed by #94
Labels
feature New feature or request

Comments

@jeremycline
Copy link
Member

Current situation

Prior to #84 we didn't declare a Minimum Supported Rust Version. Based on #92 1.76 is too new. We should select a MSRV deemed acceptably old and add it to CI to ensure we work with it.

Impact

While it's fairly easy to get the latest versions of Rust via rustup, distributions often lag behind current Rust releases by a lot. It's possible to build with a new toolchain and use the result on older distros, but if we want to build with the distribution toolchains we'll need to be more conservative about using new stdlib features.

Implementation options

Debian 12 looks to ship 1.63. I believe the latest RHEL 9 minor version includes 1.75.

If the goal is to build with distro-shipped toolchains we'll need to go back to at least 1.63 which shipped in August of 2022.

If we're okay not building with distro toolchains we could pick whatever the project currently builds with and call it a day. That way we are at least explicit about what we support.

@jeremycline jeremycline added the feature New feature or request label Jun 26, 2024
@dongsupark
Copy link
Collaborator

dongsupark commented Jul 2, 2024

Let's try to run CI with both toolchains, "stable" and "a fairly old version that is still wide-spread". Question is how do we figure out the latter in an automated way, without having to depend on Rust versions of specific distros.

I am thinking about using specific syntax supported by dtolnay/rust-toolchain, like:

      matrix:
        rust: [stable, stable 18 months ago]
...
  - uses: dtolnay/rust-toolchain@master
    with:
      toolchain: ${{matrix.rust}}

As of now "stable 18 months ago" means around 1.67 from Jan 2023, that looks already old enough I suppose.

To do that, we would need to switch from the current actions-rs/toolchain to dtolnay/rust-toolchain action. That is reasonable because actions-rs/toolchain is almost unmaintained.

@dongsupark
Copy link
Collaborator

As of now "stable 18 months ago" means around 1.67 from Jan 2023, that looks already old enough I suppose.

Actually the current source cannot be built with Rust 1.66.1, 18 months ago, because:

error: package `nix v0.29.0` cannot be built because it requires rustc 1.69 or newer, while the currently active rustc version is 1.66.1
Either upgrade to rustc 1.69 or newer, or use
cargo update -p [email protected] --precise ver
where `ver` is the latest version of `nix` supporting rustc 1.66.1

That is a good example of why it is hard to support compilation with such an ancient compiler.

So I went with "stable 12 months ago", Rust 1.70.
Will soon create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants