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

Contemplate callr:r()'s user_profile argument #340

Closed
jennybc opened this issue Dec 28, 2020 · 2 comments · Fixed by #360
Closed

Contemplate callr:r()'s user_profile argument #340

jennybc opened this issue Dec 28, 2020 · 2 comments · Fixed by #360

Comments

@jennybc
Copy link
Member

jennybc commented Dec 28, 2020

The default behaviour for the user_profile argument has changed since reprex last got serious attention:

3.4.0 (2019-12-09) system_profile = FALSE, user_profile = "project",
2.0.0 (2018-01-28) system_profile = FALSE, user_profile = FALSE,      <-- I think my use of callr is designed for this
1.0.0 (2016-06-18) system_profile = TRUE, user_profile = TRUE,

Documentation for the argument:

Whether to use the user's profile file. If this is "project", then only the profile from the working directory is used, but the R_PROFILE_USER environment variable and the user level profile are not.

In normal usage, I think it's OK that reprex is ignorant of user_profile because by default we reprex in the temp dir and, therefore, no .Rprofile is used by callr::r().

But if outfile is used, a project-level .Rprofile is potentially used. At the very least, this feels like something to be analyzed and documented. It's conceivable I should set user_profile = FALSE in reprex (that would be the most conservative approach in terms of not allowing changes in callr to change behaviour of reprex r-lib/callr#135 (comment)).

@jennybc
Copy link
Member Author

jennybc commented Jan 13, 2021

This is also connected to #284, which is whether / how to acknowledge projects that use renv, which relies heavily on .Rprofile.

@jennybc
Copy link
Member Author

jennybc commented Jan 13, 2021

Discussed with @hadley. We're going to try letting this happen, but we should make it such that the final reprex output contains evidence that a local .Rprofile was used (and message about this).

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

Successfully merging a pull request may close this issue.

1 participant