Skip to content
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

Regulating our MSRV #1554

Open
hdost opened this issue Feb 17, 2024 · 5 comments
Open

Regulating our MSRV #1554

hdost opened this issue Feb 17, 2024 · 5 comments

Comments

@hdost
Copy link
Contributor

hdost commented Feb 17, 2024

A recent Dependabot update changes env_logger
The biggest risk from my perspective is the MSRV changed to 1.71

While we do have a policy that as long as we're >= 3 behind stable then we don't consider it breaking. However, I'd like us to consider that ferrocene is a certified compiler. Which can now be used in automotive use cases. Ferrocene is essentially Rust, but it's not the latest version. As of their first version it's equivalent to 1.68.2. Our current MSRV is Rust 1.65. Their next certified version is going to skip to 1.76.0.

There's also work on the rust project to deliver a spec for the language which should in theory develop a quicker cycle for getting certified in the future.

I'd propose that we make sure that we're at least compatible with the latest version of ferrocene. What that would look like:

  • Current MSRV: 1.65.
  • Current Ferrocene Equivalent 1.68.2
  • Latest Stable: 1.76
  • Today our Maximum MSRV 1.68

Once May 2024:

  • Latest Stable 1.79. (Rust is on a monthly release cycle, so 1.77 will be the 3rd most recent for May)
  • Ferrocene will be 1.76 compatible
  • Maximum MSRV would be 1.76.

Essentially it should be:

min( (Stable - 3 minor revisions), (Ferrocene Supported Rust Version) )

Beyond that though I do think we should only bump if there's a good reason to bump in the name of maintaining compatibility. Good reasons include: Core dependencies require a bump, so long as we're not violating the above rule.

What are your thoughts?

Originally posted by @dependabot in #1546

EDIT: Updated links to relevant content.

@TommyCpp
Copy link
Contributor

I think our general idea is to keep the MSRV as low as possible. Could you elaborate on what benifit of using a certified compiler? I'd image most of our users use vanilla Rust compiler

@hdost
Copy link
Contributor Author

hdost commented Feb 19, 2024

Yes i would agree that we don't want to bump the compiler if we do the have to, but that the ceiling for that should be lower than just 3 behind latest stable.

The reason for using the certified compiler is for government regulation purposes, the most cited example is things like automotive. C and C++ follow compliance of a number of ISO standards. The goal for these is have predictable behavior from a spec. Currently the rust compiler itself doesn't have one (yet) but there's active work.

A blog post from late last year talks about some of it https://blog.rust-lang.org/inside-rust/2023/11/15/spec-vision.html
Ferrocene blog https://ferrous-systems.com/blog/officially-qualified-ferrocene/

@djc
Copy link
Contributor

djc commented Feb 22, 2024

Note that env_logger is only used in examples, so keeping an older version around really doesn't matter.

In many projects I have my MSRV CI jobs set to run cargo check --lib to avoid dev-dependencies like this, but unfortunately that doesn't work for this case because env_logger adopted some Cargo manifest options that break on older Cargo whether the dependency is actually pulled in or not.

@hdost
Copy link
Contributor Author

hdost commented Feb 22, 2024

Ah so in this case we can also avoid this conflict for env_logger at least by not caring about the examples.

@djc
Copy link
Contributor

djc commented Feb 22, 2024

Yup!

hdost added a commit to hdost/opentelemetry-rust that referenced this issue Apr 21, 2024
We don't want to include it in the top level workspace as it interferes
with MSRV, and doesn't provide benefit.

Also bump to 0.11 in example.

Relates open-telemetry#1546,open-telemetry#1554
hdost added a commit to hdost/opentelemetry-rust that referenced this issue Apr 21, 2024
- We don't want to include it in the top level workspace as it interferes
  with MSRV, and doesn't provide benefit.
- For MSRV check we just run check.
- Also bump to 0.11 in example.

Relates open-telemetry#1546,open-telemetry#1554
hdost added a commit to hdost/opentelemetry-rust that referenced this issue Apr 21, 2024
- We don't want to include it in the top level workspace as it interferes
  with MSRV, and doesn't provide benefit.
- For MSRV check we just run check.
- Also bump to 0.11 in example.

Relates open-telemetry#1546,open-telemetry#1554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants