precommit
precommit copied to clipboard
Changing the R version breaks the pre-commit cache
Before filing a bug
- [x] I have installed the latest dev version of {precommit} with
remotes::install_github('lorenzwalthert/precommit') - [x] I have installed the latest hook revisions (update with
precommit::autoupdate()) - [x] 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.