tokio-rs / prost

PROST! a Protocol Buffers implementation for the Rust Language
Apache License 2.0
3.87k stars 501 forks source link

feat(prost-build): emit `rerun` commands #1140

Open caspermeijn opened 1 month ago

caspermeijn commented 1 month ago

Inform cargo about the files and env vars used by prost-build. Then cargo can better determine when to rebuild a project.

https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed

BREAKING CHANGE: Previously cargo assumed it had to rerun build.rs if any files in the project changed. prost-build will now emit rerun commands, which means only the explicitly marked files cause a rerun. If build.rs is dependent on any other file paths than those given to prost-build, then your build.rs needs to emit rerun commands as well.