Skip to content

sources should include Cargo.lock #218

@CGMossa

Description

@CGMossa

Currently, pkgbuild:::sources tracks many files under src/, but it ignores Cargo.lock. The practical advice is generally that Cargo.lock ought to be tracked (via version control) in the case of a binary, and not in the case of a library. That's because you cannot cargo install a library. But a rust crate embedded in an R package is regarded as a binary in this instance, as we can install an r-package. Cargo.lock helps with tracking dependencies, and aid in reproducible builds, and also it is something that changes irrespective of rust crates' source files .rs, and the Cargo.toml file. A lockfile is changed through a call to cargo update for instance. See https://doc.rust-lang.org/cargo/commands/cargo-generate-lockfile.html for details.

For now, to circumvent the lack of rebuilding behaviour through devtools (facilitated by pkgbuild) one may write this in the DESCRIPTION file:

Config/build/extra-sources: src/rust/Cargo.lock

I would love it if pkgbuild:::sources were changed so it would also include Cargo.lock files.

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