Skip to content

Changing the R version breaks the pre-commit cache #567

@lorenzwalthert

Description

@lorenzwalthert

Before filing a bug

  • I have installed the latest dev version of {precommit} with remotes::install_github('lorenzwalthert/precommit')
  • I have installed the latest hook revisions (update with precommit::autoupdate())
  • I have installed the latest release of the upstream Python framework pre-comit as described under the update instructions.

Describe the bug

Seems like changing the R version locally (or in CI where there is a pre-commit cache) breaks pre-commit, as packages are installed for a minor version of R, e.g. R 4.3. Here's a log from {styler}: https://github.com/r-lib/styler/actions/runs/9148472836/job/25151047120

To Reproduce

Install hooks for one R version and then switch

Expected behavior

The cache should be rebuilt

Additional context

I think this needs to be fixed upstream.

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