How to find which *commit* on nightly rust broke the tests of my crate?

I already found when it broke:

  • passes: rustup default nightly-2024-07-29 && cargo test --doc
  • fails: rustup default nightly-2024-07-30 && cargo test --doc

But reading Commits · rust-lang/rust · GitHub didn't help me to narrow it down. (It's about float precision during the computation of exp. Now depending on which branch of my code it took, the result is slightly different, only for that float function)

(the failure for the curious: Miri · tdelmas/typed_floats@83d574c · GitHub . It has nothing to do with Miri, except the fact that it uses nightly)


stderr:
thread 'main' panicked at typed_floats/src/types/mod.rs:9:1:
assertion `left == right` failed
  left: Positive(2.7182818284590455)
 right: 2.718281828459045

There's a tool to do exactly that:

4 Likes

I didn't bisect but this seems likely.

2 Likes

Thank you both!

With the suggestion of cargo-bisect-rustc from @kornel I have confirmed that it was indeed `f64::log` precision change in 1.82 nightly · Issue #128386 · rust-lang/rust · GitHub as suggested by @quinedot !

********************************************************************************
Regression in 80d8270d8488957f62fbf0df7a19dfe596be92ac
********************************************************************************

Update compiler_builtins to 0.1.114 by nicholasbishop · Pull Request #125016 · rust-lang/rust · GitHub

image

Which does update compiler-builtins from 0.1.105 to 0.1.114 and the issue `f64::log` precision change in 1.82 nightly · Issue #128386 · rust-lang/rust · GitHub found its source in Fix math libraries not being linked on some platforms by Amjad50 · Pull Request #594 · rust-lang/compiler-builtins · GitHub, merged into the 0.1.110

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.