You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have some packages that are installed but not recorded, and some other packages that are installed AND recorded but an inconsistent version, renv::status() is only showing me the former and not displaying the latter.
Reprex
Create a directory with script.R:
library(data.table)
print(data.table(foo = 1:3, bar = 4:6))
In the directory, run:
% R
> renv::init()
- Linking packages into the project library ... Done!
The following package(s) will be updated in the lockfile:
# CRAN -----------------------------------------------------------------------
- data.table [* -> 1.14.8]
- renv [* -> 1.0.3]
The version of R recorded in the lockfile will be updated:
- R [* -> 4.2.3]
- Lockfile written to "~/scratchpad/renv-masking-reprex/renv.lock".
- renv activated -- please restart the R session.
[ctrl-D]
% R
> renv::install("data.table@1.14.6")
[installs]
> renv::status()
As expected:
The following package(s) are out of sync [lockfile -> library]:
# CRAN -----------------------------------------------------------------------
- data.table [1.14.8 -> 1.14.6]
See ?renv::status() for advice on resolving these issues.
% R
> renv::status()
The following package(s) are missing:
package installed recorded used
ggplot2 n n y
See ?renv::status() for advice on resolving these issues.
No information is given about data.table's discrepancy anymore.
This can lead to some unexpected behavior if you run renv::restore() or renv::snapshot() in a more realistic scenario, expecting it only to affect packages listed by renv::status(). (Thankfully, those functions will prompt you with the full list of things they're about to change, so a keen eye will reveal what's going on.)
The text was updated successfully, but these errors were encountered:
@dvg-p4 awesome, much appreciated! This should now be resolved.
kevinushey
changed the title
[STUB] renv::status() displaying incomplete information about inconsistencies
renv::status() displaying incomplete information about inconsistencies
Jan 16, 2024
When I have some packages that are installed but not recorded, and some other packages that are installed AND recorded but an inconsistent version, renv::status() is only showing me the former and not displaying the latter.
Reprex
Create a directory with
script.R
:In the directory, run:
As expected:
Now, edit script.R:
No information is given about data.table's discrepancy anymore.
This can lead to some unexpected behavior if you run
renv::restore()
orrenv::snapshot()
in a more realistic scenario, expecting it only to affect packages listed byrenv::status()
. (Thankfully, those functions will prompt you with the full list of things they're about to change, so a keen eye will reveal what's going on.)The text was updated successfully, but these errors were encountered: