Skip to content

Rethink package cache #189

Open
Open
@zkamvar

Description

@zkamvar

The pacakge cache utilities at this point work, but with issues like zkamvar/test-with-renv#17 where user intervention is required to update things, it would be good to step back and consider how the users will be using the cache.

Regular usage: bring in new packages, keep the old

At the moment, the pattern for building lessons assumes that anything can change in the source of the lessons, so we need to be prepared to bring in new packages, even if they are not currently installed. This is done with the following steps:

  • hydrate (search for new packages added into the lesson and download them to the library)
  • restore (restore the packages recorded in the lockfile)
  • implicit snapshot (record the new packages in the lockfile and purging any unused packages from the lockfile)

Explicit updating: update existing and bring in new packages

I believe I need to revamp this to be more consistent on CI vs Local install. The restore may not be absolutely necessary, because once I had pinned {stringi}, I was able to run update_cache() with no trouble (context: one of the dependencies, adegenet, recently dropped it's strict dependency for {sf} and those dependencies disappeared on the repo)

Continuous integration

Locally

  • update (because the package cache should already exist?)
  • snapshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    package cacheRelated to the {renv} package cachequestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions