Closed wisarmy closed 2 years ago
Hi @wisarmy.
I tested it myself, at least it's not a bug. The reason for this is that the rebuild is not used. The recommended way is to cargo clean first, then execute cargo build, or use the ci/cd pipeline tool to help you perform this operation.
Ref link:
Yes, But it's always inconvenient.
fn main() -> shadow_rs::SdResult<()> {
println!("cargo:rerun-if-changed=.");
shadow_rs::new()
}
Can be used as an optimization option in the future.
Thanks @baoyachi
Yes, But it's always inconvenient.
fn main() -> shadow_rs::SdResult<()> { println!("cargo:rerun-if-changed=."); shadow_rs::new() }
Can be used as an optimization option in the future.
Thanks @baoyachi
Oh,println!("cargo:rerun-if-changed=.");
not adapted cargo workspace
Yes, really is not good.
I found anthor crate, It's expected. I don't know how it's done. cargo rebuilt when git is committed, only files are changed not rebuilt
code
Details of the problem
The git latest hash is
ef8195a97d0875940d591ec160aea13619a6c4d4
, but printlnbuild::SHORT_COMMIT
is an old hashebb4cc3170d56efb7a53ae9be8ab29ba339791f2
. Thebuild::SHORT_COMMIT
is updated only when the target directory is deletedThe command-line log is as follows:
shadow-rs version