`sources` should include `Cargo.lock`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- build-system
Research direction
Start at the pkgbuild:::sources entry point and inspect how files under src/ are collected, with particular attention to src/rust/Cargo.lock. Confirm the existing DESCRIPTION workaround and verify that Cargo.lock files are included in the returned sources list without needing that workaround.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- R
- Stars
- 77
- Forks
- 43
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-lib/pkgbuild
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·