Repository navigation
allow user, admin to configure default .Rproj.user path - #15140
Merged
Merged
Conversation
kevinushey
commented
Sep 10, 2024
| it = dcfFields.find("ProjectId"); | ||
| if (it != dcfFields.end()) | ||
| { | ||
| std::string projectId = it->second.empty() ? core::system::generateUuid(true) : it->second; |
Collaborator
Author
There was a problem hiding this comment.
This empty check is just me being defensive; it might not be necessary?
Contributor
|
QA note: Keep in mind the project-level setting. |
dmurdoch
added a commit
to haozhu233/kableExtra
that referenced
this pull request
Jan 5, 2025
r3xth0r
added a commit
to r3xth0r/bivariate-lsm
that referenced
this pull request
Jan 16, 2025
|
If you need R code to obtain the location, I found this works: rs_prefs <- paste0(Sys.getenv("APPDATA"),"/RStudio/rstudio-prefs.json") # Windows
if(Sys.info()["sysname"]!="Windows") rs_prefs <- "~/.config/rstudio/rstudio-prefs.json" # Unix
rjson::fromJSON(file=rs_prefs)$project_user_data_directoryAm I missing something in Edit: this is indeed available: rstudioapi::readRStudioPreference("project_user_data_directory", NULL)Note that it returns "" if the setting is available but not set before. |
brry
added a commit
to openHPI/codeoceanR
that referenced
this pull request
Jan 18, 2025
…list to that folder, see rstudio/rstudio#15140
brry
added a commit
to brry/course
that referenced
this pull request
Jan 18, 2025
3 tasks
johann-wagner
added a commit
to johann-wagner/johann-wagner.github.io
that referenced
this pull request
Feb 25, 2025
ericrobskyhuntley
added a commit
to ographiesresearch/urbanplanr
that referenced
this pull request
Mar 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Addresses #15098.
Approach
This PR augments each project's
.Rprojfile with a new ProjectId entry. This entry is just a GUID, but it's used to map to an external.Rproj.userfolder when the user or administrator has enabled this.Users can set a default "project user data directory" within Global Options... -> General -> Advanced:
If this value is set, then the project's state is then written to a folder at the path:
instead of just the project's
.Rproj.user.The project ID above is generated on demand as a GUID, and stored as part of the project's
.Rprojfile.Automated Tests
Not included.
QA Notes
Using the new UI mentioned above, try setting this directory to some value, e.g.
/tmp/rstudio-data. Try creating a new project. After doing so, look within this directory -- you should see files like (for example):Documentation
TODO: We'll probably want to add some detail in the RStudio user guide + admin guide
Checklist
NEWS.md