Skip to content

wishlist: Move out Cargo.lock to prevent interference with git operations #339

Open
@chrysn

Description

@chrysn

Some projects have their Cargo.lock checked in to versioning; that is recommended at least for binary crates, and AIU even viewed more positively on libraries these days.

As soon as Cargo.toml is out of sync with Cargo.lock (eg. because a dependency has been added but not committed), having bacon running updates Cargo.lock on every reload, due to the tools it calls (almost every cargo command updates it). This interferes with many git changes, eg. stash pushing and popping, or rebases, because all the time there will be a dirty Cargo.lock that keeps the stash pop from working (because of course there was a change to Cargo.lock stashed away too that now conflicts) or that stops the --autostash rebase due to suddenly modified files.

Could bacon suppress writes to Cargo.lock, either by passing explicit arguments to the tools it calls by default, or by copying Cargo.lock out into an untracked location on every change to the original Cargo.lock and bending the location that cargo writes to through an environment variable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions