baoyachi / shadow-rs

A build-time information stored in your rust project.(binary,lib,cdylib,dylib)
https://docs.rs/shadow-rs
MIT License
444 stars 40 forks source link

Generated code not compatible with older clippy versions. #143

Closed sholderbach closed 10 months ago

sholderbach commented 11 months ago

The fix for #141 introduces a problem for folks using an older rust toolchain. Clippy will complain about the unknown lint:

error: unknown lint: `clippy::needless_raw_string_hashes`
Error:   --> /home/runner/work/nushell/nushell/target/debug/build/nu-cmd-lang-05d8af32cd96fda8/out/shadow.rs:12:9
   |
12 | #[allow(clippy::needless_raw_string_hashes)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unknown-lints` implied by `-D warnings`

https://github.com/nushell/nushell/actions/runs/6293295044/job/17083630612?pr=10495

Using 1.70.0 in the rust-toolchain.toml: https://github.com/nushell/nushell/blob/d2f513da36fe3e8b2b60584e28deaa2c4253f666/rust-toolchain.toml#L19

Maybe this can be suppressed by allowing unknown-lints for the file?

baoyachi commented 10 months ago

@sholderbach new version published, please use:

shadow-rs = "0.24.1"
sholderbach commented 10 months ago

Awesome! Thanks, good call with the general allow().