posit-dev / publisher

MIT License
5 stars 0 forks source link

What to do when renv.lock R version isn't the current one #2192

Closed dotNomad closed 1 week ago

dotNomad commented 2 months ago

It can be confusing when there's an renv.lock file containing an R version that doesn't match what you are running. When you inspect a project, the generated config always uses the version from renv.lock if possible, otherwise it runs R to determine the version.

We need to evaluate the workflow steps in this case, both in R (e.g. running renv::restore) and in Publisher to be sure the use cases make sense.

dotNomad commented 2 months ago

Could be part of a pre-check on deployment alongside #2018

dotNomad commented 2 months ago

We can start out by - if we detect this situation - we should say something to the user.

We can explain that we are using the version from therenv.lock.

We can run through the use case in VS Code and Positron, and see what their extensions are giving us for R.

dotNomad commented 2 months ago

We can do the immediate fix to say something to the user, and create a follow-up for a more long term, helpful solution.

dotNomad commented 1 week ago

Closing this one up. We can rely on renv errors being bubbled up to the user in #2408 to handle this case. If we need to do something more we can open a new issue.