Skip to content
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

Open
klmr opened this issue Aug 2, 2024 · 1 comment
Open

renv::load(other_project) fails if autoload is disabled #1959

klmr opened this issue Aug 2, 2024 · 1 comment

Comments

@klmr
Copy link
Contributor

klmr commented Aug 2, 2024

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), because renv:::renv_load_switch(), which is called by renv::load(), sources the other project’s renv/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.

@kevinushey
Copy link
Collaborator

This definitely seems like an oversight; I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants