cargo-udeps icon indicating copy to clipboard operation
cargo-udeps copied to clipboard

Found a `cargo::key=value` build directive which is reserved for future use

Open chris13524 opened this issue 1 year ago • 2 comments

I get this error when trying to build my crate while taking advantage of build.rs and println!("cargo::rerun-if-changed=src");

error: unsupported output in build script of `cargo-udeps-test v0.1.0 (/Users/chris13524/Downloads/cargo-udeps-test)`: `cargo::rerun-if-changed=src`
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.

According to the linked documentation, :: is the new syntax and since I'm on the latest versions of stable and nightly (both 1.77+) I should not be getting this error.

It seems that when using master the issue is fixed, so perhaps cutting a release will resolve the issue.

Steps to reproduce:

  • rustup update
  • cargo new cargo-udeps-test
  • nano build.rs - fn main() { println!("cargo::rerun-if-changed=src"); }
  • cargo install cargo-udeps --locked
  • cargo +nightly udeps - broken
  • cargo install --git https://github.com/est31/cargo-udeps --locked
  • cargo +nightly udeps - works

chris13524 avatar Apr 24 '24 22:04 chris13524

We are experiencing the same issue :cry: Our cargo udeps CI jobs use https://github.com/taiki-e/install-action to install the latest Gihtub release of cargo udeps, which currently is 0.1.47. If we force the use of 0.1.48 instead, cargo udeps works with the new :: syntax. This is not ideal, since it means that we need to temporarily modify our github workflows.

It seems like a release was cut already, but the CI failed on macOS: https://github.com/est31/cargo-udeps/actions/runs/8955509981. Is someone working on resolving this? :blush:

MarkusPettersson98 avatar May 14 '24 07:05 MarkusPettersson98

I've seen the build failure, it seems like a homebrew issue to me. I suppose that's why the release is marked as "unfinished" even though all other platforms worked. @chenrui333 the issue seems to be homebrew related. Do you have an idea why there is binaries for the wrong architecture?

est31 avatar May 24 '24 10:05 est31