posit-dev / publisher

MIT License
6 stars 1 forks source link

`renv` errors are hidden behind could not scan errors #2408

Closed dotNomad closed 3 weeks ago

dotNomad commented 1 month ago

We should not be hiding renv errors from the user where possible.

https://github.com/posit-dev/publisher/blob/564c3fa67ac0f3a18ecf0d85c3e8fb4a2ffbc342/internal/publish/r_package_descriptions.go#L41

In this case it is not clear at all what has occurred since "Could not scan R packages from lockfile: renv.lock" tells me very little.

In this case the actual error I hit was

time=2024-10-21T14:55:43.044-07:00
level=ERROR
msg="Deployment failed"
local_id=XexnapXUlysKGUce
error="package bslib: lockfile version '0.4.2', library version '0.8.0': package versions in library and lockfile are out of sync; use renv::restore() or renv::snapshot() to synchronize"