autocxx icon indicating copy to clipboard operation
autocxx copied to clipboard

"cargo:rerun-if-changed" missing colon?

Open barries opened this issue 2 months ago • 1 comments

Describe the bug

autocxx emits lines like:

cargo:rerun-if-changed=/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11/bits/c++config.h
cargo:rerun-if-changed=/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11/bits/os_defines.h

when the current spec is to emit the cargo:: prefix with two colons.

To Reproduce

Cause a build.rs failure when using autocxx and examine the output.

Expected behavior

autocxx emits lines with correct prefixes.

Additional context Add any other context about the problem here.

barries avatar Oct 16 '25 19:10 barries

Both forms are valid; see the note in Cargo's "Build Scripts" documentation:

MSRV: 1.77 is required for cargo::KEY=VALUE syntax. To support older versions, use the cargo:KEY=VALUE syntax.

Since autocxx has an MSRV of 1.77, they could switch to the new form, but using the old one doesn't really hurt anything.

tchebb avatar Nov 05 '25 18:11 tchebb