knurling-rs / defmt

Efficient, deferred formatting for logging on embedded systems
https://defmt.ferrous-systems.com/
Apache License 2.0
812 stars 74 forks source link

Switch to Cargo instruction compatible with older versions of Cargo #838

Closed arctic-alpaca closed 4 months ago

arctic-alpaca commented 4 months ago

Fixes https://github.com/knurling-rs/defmt/issues/837

arctic-alpaca commented 4 months ago

This is indeed deprecated, but required for older versions of cargo to function: Note: The old invocation prefix cargo: (one colon only) is deprecated and won’t get any new features. To migrate, use two-colons prefix cargo::, which was added in Rust 1.77. If you were using cargo:KEY=VALUE for arbitrary links manifest key-value pairs, it is encouraged to switch to cargo::metadata=KEY=VALUE. Stick to cargo: only if the support of Rust version older than 1.77 is required. (source)

This PR brings the newly added cargo:rustc-check-cfg instruction in line with other instructions already present, that all use the deprecated invocation prefix.

For backwards compatibility while migrating to the new prefix, a feature could be added to switch to the old prefix for those stuck on older toolchain versions.