Skip to content

Cargo should not consider the build script as stale with every modification #1162

Closed
@tomaka

Description

@tomaka

When a package has a build script and you modify any file in your project, everything gets recompiled.

I'm currently working on a library named glium which is starting be have a moderate size and which uses build scripts only for code generation.

Modifying the code of an example or a test and running "cargo build" recompiles everything, which takes 3-4 minutes on my machine. Due to this, it's very annoying to write tests or examples.

Suggestion

Build scripts should output cargo:depends=/path/to/file just like they output rustc-flags. Only modifications in the files which they depend upon, plus the build script itself and its modules, trigger a recompilation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions