Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chris13524 opened this issue Apr 24, 2024 · 2 comments

Comments

@chris13524
Copy link

chris13524 commented Apr 24, 2024

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
@MarkusPettersson98
Copy link

We are experiencing the same issue 😢 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? 😊

@est31
Copy link
Owner

est31 commented May 24, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants