I noticed with replacing the asset txt files you don't need to use cargo clean if you just save it after replace. Then I noticed that if you save the replacing file after using git checkout . to reset local changes, cargo run will actually pick it up. So I believe this isn't related to include_dir but Cargo itself specific to Windows?
I think Windows copy preserves the timestamp (whereas unix doesn't do that by default), so if you copy a file in with an older timestamp, it won't rebuild.
I'm a little confused how include_dir works though, it has a metadata feature that doesn't seem to be used? So is it only used for embedding files now?
Just got around to trying it on linux and it happens here too, so it's not about Windows. However after git checkout . you don't need to save on linux so it works a bit differently but otherwise same problem.
I noticed with replacing the asset txt files you don't need to use
cargo clean
if you just save it after replace. Then I noticed that if you save the replacing file after usinggit checkout .
to reset local changes,cargo run
will actually pick it up. So I believe this isn't related toinclude_dir
but Cargo itself specific to Windows?https://github.com/rust-lang/cargo/issues/9598#issuecomment-864214918It mentions this issue tracking it https://github.com/rust-lang/cargo/issues/6529
I'm a little confused how
include_dir
works though, it has a metadata feature that doesn't seem to be used? So is it only used for embedding files now?