Pin R version in pre-commit
action to get around version resolution bug
#39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All of our repos that consume the pre-commit action in this repo started failing with a myserious renv installation error today:
It turns out that the root problem here is that the
setup-r
step passes R version4.4
, which is currently resolving to R3.0.0
in the underlyingrversions
node package (see r-hub/node-rversions#34). Since renv 1.1.4 is not available for R version 3.0.0, the renv bootstrap step inactivate.R
fails while attempting to install https://github.com/lorenzwalthert/precommit.While we wait for a more permanent fix, this PR works around the issue by pinning the R version directly to the
4.4.3
minor version in thesetup-r
step of this job.See these workflow run logs for evidence that the change works: https://github.com/ccao-data/data-architecture/actions/runs/15124238450/job/42513183828?pr=822