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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 30, 2024

  1. feat(prost-build): emit rerun commands

    Inform `cargo` about the files and env vars used by `prost-build`. Then `cargo` can better determine when to rebuild a project.
    
    - Emit `rerun-if-changed` for each proto file specified
    - Emit `rerun-if-changed` for each include directory specified
    - Emit `rerun-if-changed` if `file_descriptor_set_path` is set
    - Emit `rerun-if-env-changed` for `PROTOC` and `PROTOC_INCLUDE`
    
    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.
    caspermeijn committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    b4c8112 View commit details
    Browse the repository at this point in the history