twosigma/nsncd

MSRV

geofft opened this issue · 4 comments

Internally we run nsncd on Debian Stretch, which has rustc 1.41, until Stretch LTS EOL mid-next year.

Our tests and benchmarks don't work on 1.41, though the program itself works:

# cargo +1.41.0 test
   Compiling nsncd v1.2.0 (/root/nsncd)
error[E0277]: can't compare `&[u8]` with `std::vec::Vec<u8>`
   --> src/protocol.rs:216:9
    |
216 |         assert_eq!(header.as_slice(), expected);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `&[u8] == std::vec::Vec<u8>`
    |
    = help: the trait `std::cmp::PartialEq<std::vec::Vec<u8>>` is not implemented for `&[u8]`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
# cargo +1.41.0 bench
   Compiling criterion v0.3.5
error[E0658]: use of unstable library feature 'matches_macro'
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/criterion-0.3.5/src/stats/univariate/outliers/tukey.rs:227:9
    |
227 |         matches!(*self, HighMild | HighSevere)
    |         ^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/65721

Should we try to keep at least tests working on 1.41.0? If so, let's adjust our CI to handle that, too.

This was fixed by #30 I think, but not closed out.

I think this ticket was about the fact that test/bench didn't work on 1.41 but the binary did.

Since #36 the binary doesn't work either (some dependencies have been upgraded to use edition 2021). While we've dropped Stretch internally, we're still using Buster (oldstable), whose packaged rustc seems to also be 1.41. So we should downgrade some dependencies, and maybe also reopen this if we feel like it's important for tests to run on oldstable.

Ugh, let me know if you want to revert #36, but hopefully you get CI working.

Sorted out in #46. For the question of tests, it doesn't seem terribly easy - Criterion's MSRV policy is "Criterion.rs supports the last three stable minor releases of Rust. ... Future versions of Criterion.rs may break support for such old versions, and this will not be considered a breaking change." And it brings in dependencies that in turn seem to not treat MSRV bumps as breaking. So let's leave this closed as WONTFIX.