-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renv::load(other_project) fails if autoload is disabled #1959
Comments
This definitely seems like an oversight; I'll take a look. |
Should be addressed via 2c51854; please let me know if this still appears to be an issue. |
(I am super confused by the version numbers… I wanted to try out this commit but when comparing version numbers I noticed that this is apparently v1.0.7.9000, whereas I currently have v1.0.11 installed from CRAN. Are y’all counting backwards? 😆) |
Shouldn't be that way; the current version on main is 1.0.11.9000: Line 4 in e7e1f4b
How did you install the development version of renv? Is an older version somehow getting installed here? |
(The associated commit fixing the issue was actually merged some time ago; perhaps that's why?) |
Ah I hadn’t noticed that! So the relevant change 2c51854 is already included in the version 1.0.11 that’s on CRAN. — I can’t quite reconstruct what happened since the bug was not yet fixed when I tested it yesterday before applying the patch, and However, after some back and forth, first installing the specific |
In my environment I have intentionally set
options(renv.config.autoloader.enabled = FALSE)
. In principle this works well.However, it also breaks
renv::load(other_project)
, becauserenv:::renv_load_switch()
, which is called byrenv::load()
, sources the other project’srenv/activate.R
file, which aborts if auto-loading is disabled.As a user, this is unexpected: explicitly calling
load()
is the opposite of auto-loading. I’m wondering whether that’s an oversight (I am guessing that few people disable auto-loading, so that option is probably not as battle-tested) — or whether this is working as intended: in that case, is there a way of explicitly loading/switching to another renv project while keeping auto-loading disabled?A workaround would be to temporarily unset the
renv.config.autoloader.enabled
option, but that requires awareness of the semantics.The text was updated successfully, but these errors were encountered: