cargo uses file update time instead of content diff to determine whether to compile #5679
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
I recently found that cargo uses file update time to determine whether to compile. Most times this works fine, but if I uses the following Dockerfile, the build output will remains the same as an bootstrap project.
The container just outputs
Hello world!
assrc/main.rs
is changed before the compiled binary. I think cargo should use file content diff to determine whether to compile again, instead of file update time. Using file update time creates a confusion.To workaround this, a
RUN touch src/main.rs
should be added afterCOPY . .
.The text was updated successfully, but these errors were encountered: