rstudio / rstudio/packrat

improve the hash function

Open
#202 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
409
Forks
89
PR merge metrics
No merged PRs in 30d

Description

From @jcheng5:

  • The GitHub SHA is used verbatim as the hash, if it's present--doesn't that omit the LinkingTo info?
    https://github.com/rstudio/packrat/blob/473e73e66c283e9272beb15f48a8c6b9bfe2db29/R/cache.R#L23-L24
  • I suspect the "fields" variable doesn't include enough fields--does it distinguish between GitHub and CRAN sourced packages, for example?
  • Rather than recursively calling hash() on the LinkingTo packages, shouldn't we rather pull the Hash field out of their DESCRIPTION files? (assuming we always install this field into the DESCRIPTION file after we install)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the hash() implementation in R/cache.R at the linked lines and inspect how the fields variable is assembled. Compare handling of GitHub and CRAN packages, LinkingTo dependencies, and the Hash field in DESCRIPTION files; done means the hash captures the relevant source and dependency information without the unresolved ambiguities in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.