Problem
When a user explicitly sets an R version in deployment.toml (e.g., 4.5.2), but the renv.lock file contains a different R version (e.g., 4.4.0), Publisher derives a RequiresRVersion constraint from the renv.lock (~=4.4.0) and then fails deployment with:
Cannot find compatible environment: no compatible Local environment with R version 4.5.2 (~=4.4.0) and Quarto version 1.8.26.
Expected Behavior
- The R version explicitly set in
deployment.toml should take precedence over the version recorded in renv.lock for the RequiresRVersion constraint
- Publisher should detect this conflict earlier and provide actionable guidance (e.g., "Your deployment.toml specifies R 4.5.2 but your renv.lock was created with R 4.4.0 — run
renv::snapshot() with R 4.5.2 to update it")
- The error message should make it clear which file is the source of the conflicting constraint
Steps to Reproduce
- Have an R project with
renv.lock created under R 4.4.x
- Update
deployment.toml to specify R version 4.5.2
- Attempt to publish
Context
Related (but different): #2648
Problem
When a user explicitly sets an R version in
deployment.toml(e.g.,4.5.2), but therenv.lockfile contains a different R version (e.g.,4.4.0), Publisher derives aRequiresRVersionconstraint from the renv.lock (~=4.4.0) and then fails deployment with:Expected Behavior
deployment.tomlshould take precedence over the version recorded inrenv.lockfor theRequiresRVersionconstraintrenv::snapshot()with R 4.5.2 to update it")Steps to Reproduce
renv.lockcreated under R 4.4.xdeployment.tomlto specify R version4.5.2Context
Related (but different): #2648