Skip to content

warn if rerun-if-changed=PATH is used but PATH points to none-existing file #6003

Open
@matthiaskrgr

Description

@matthiaskrgr

I recently ran into a weird bug where my project would always rebuild main.rs even though I didn't change any of its files.

Turned out in build.rs I had rerun-if-changed=PATH set to a wrong PATH, a PATH that never was any file, which caused to trigger rebuilds every time.

Can we print a warning if the PATH is empty, or are there cases where this could be intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-scriptsArea: build.rs scriptsA-new-lintArea: new lintA-rebuild-detectionArea: rebuild detection and fingerprintingC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`PerformanceGotta go fast!S-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions