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

Replaced files not being noticed by Cargo #57

Open
lesleyrs opened this issue Feb 12, 2023 · 1 comment
Open

Replaced files not being noticed by Cargo #57

lesleyrs opened this issue Feb 12, 2023 · 1 comment

Comments

@lesleyrs
Copy link
Contributor

lesleyrs commented Feb 12, 2023

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?

rust-lang/cargo#9598 (comment)

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.

It mentions this issue tracking it rust-lang/cargo#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?

@lesleyrs
Copy link
Contributor Author

lesleyrs commented Feb 21, 2023

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.

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

1 participant