This is likely a question and not a bug. Any help would be much appreciated.
My issue is that I am trying to use renv projects others on my team have created or simply create my own project and renv doesn't ever seem to recognize that the project exists. A simple example is pasted below. The symptom of interest is that each call to snapshot or restore only ever responds with "It looks like you've called renv::snapshot() in a project that hasn't been activate yet." I can't seem to get past this infinite loop. In addition, if I use renv::install followed by status it says my project is up to date, but the lockfile never changes and only ever has renv recorded.
At one point I thought this was due to OneDrive and the backup behavior that creates a Documents folder at a different path, but now OneDrive sync, backup, is disabled for all of these folders and completely unliked and uninstalled.
Example - create a new folder C:/Users/gueng/Documents/renvTest
Restarting R session...
> renv::init()
The following package(s) will be updated in the lockfile:
# RSPM -----------------------------------------------------------------------
- renv [* -> 1.0.7]
The version of R recorded in the lockfile will be updated:
- R [* -> 4.4.0]
- Lockfile written to "~/renvTest/renv.lock".
Restarting R session...
> renv::snapshot()
It looks like you've called renv::snapshot() in a project that hasn't been activated yet.
How would you like to proceed?
1: Activate the project and use the project library.
2: Do not activate the project and use the current library paths.
3: Cancel and resolve the situation another way.
Selection: 3
- Operation canceled.
> renv::install("dplyr")
The following package(s) will be installed:
- dplyr [1.1.4]
These packages will be installed into "C:/Users/gueng/AppData/Local/R/win-library/4.4".
Do you want to proceed? [Y/n]: Y
# Installing packages --------------------------------------------------------
- Installing dplyr ... OK [copied from cache in 0.25s]
Successfully installed 1 package in 0.3 seconds.
> renv::status()
No issues found -- the project is in a consistent state.
> renv::snapshot()
It looks like you've called renv::snapshot() in a project that hasn't been activated yet.
How would you like to proceed?
1: Activate the project and use the project library.
2: Do not activate the project and use the current library paths.
3: Cancel and resolve the situation another way.
Selection: 3
- Operation canceled
This is likely a question and not a bug. Any help would be much appreciated.
My issue is that I am trying to use renv projects others on my team have created or simply create my own project and renv doesn't ever seem to recognize that the project exists. A simple example is pasted below. The symptom of interest is that each call to snapshot or restore only ever responds with "It looks like you've called renv::snapshot() in a project that hasn't been activate yet." I can't seem to get past this infinite loop. In addition, if I use renv::install followed by status it says my project is up to date, but the lockfile never changes and only ever has renv recorded.
At one point I thought this was due to OneDrive and the backup behavior that creates a Documents folder at a different path, but now OneDrive sync, backup, is disabled for all of these folders and completely unliked and uninstalled.
Example - create a new folder C:/Users/gueng/Documents/renvTest
Session Info
Output of
renv::diagnostics()