CodSpeedHQ / codspeed-rust

Rust crates to create CodSpeed benchmarks
https://codspeed.io
Apache License 2.0
24 stars 9 forks source link

v2.7.0 fails to build on rust < 1.77.0 #51

Closed SRv6d closed 2 months ago

SRv6d commented 2 months ago

Starting with v2.7.0, codspeed-criterion-compat fails to build on rust versions lower than 1.77.0.

error: unsupported output in build script of codspeed-criterion-compat v2.7.0: cargo::rustc-check-cfg=cfg(codspeed) Found a cargo::key=value build directive which is reserved for future use. Either change the directive to cargo:key=value syntax (note the single :) or upgrade your version of Rust. See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script for more information about build script outputs.

I assume a dependency is using https://github.com/rust-lang/cargo/pull/12201/ but haven't looked further into it. Maybe codspeed could add a fixed MSRV and test it in CI?

art049 commented 2 months ago

Yes, this 2.7.0 had to add this to silence linter warnings, hence those things has been added to the build scripts, but you're right, since we don't test with an MSRV I didn't notice the issue upon release.

SRv6d commented 2 months ago

Is there a way we can fix this? Codspeed is great but it is slightly ironic that it is what was causing CI failures for me. I can pin codspeed to a version that is compatible with my MSRV, but It would obviously be nicer to have a known MSRV. 1.77.0 seems a bit young for a MSRV but this is a decision for codpseed to make.

art049 commented 2 months ago

Yes 1.77 would be a bit too young, we'll go with 1.74. And we'll be checking the MSRV in the CI as you mentionned

SRv6d commented 2 months ago

Nice, that was fast, almost benchmark worthy.