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
Injection Point to Override RStudio Hooks #4498
Comments
coatless
added a commit
to illinois-r/r-centos7-cbtf
that referenced
this issue
Mar 22, 2019
- Emphasize this shim will only work in R GUI or terminal. - RStudio overrides the `install.packages()` function with its own variant to keep its package panel up to date. - The only way to modify RStudio's override is to have the user trigger it via a package load or function call after RStudio has been fully initialized. For more details, see: rstudio/rstudio#4498
coatless
added a commit
to illinois-r/r-centos7-cbtf
that referenced
this issue
Mar 23, 2019
* Rename to setup-centos7... * Re-enable the local CRAN setup * Directly use package name in environment modifications Switches from using the package name as a symbol to having it remain as a character. * Clarity of install.packages() shim functionality - Emphasize this shim will only work in R GUI or terminal. - RStudio overrides the `install.packages()` function with its own variant to keep its package panel up to date. - The only way to modify RStudio's override is to have the user trigger it via a package load or function call after RStudio has been fully initialized. For more details, see: rstudio/rstudio#4498 * Spacing
We agree. We're tracking the enhancement here: I think what we're proposing there will address your use case, so I'm closing this one for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to be able to add a custom hook within hooking architecture /
"tools:rstudio"
that RStudio sets. I'm specifically making this request to obtain access to theinstall.packages()
hook established after the R session was fully established. c.f.rstudio/src/cpp/session/modules/SessionPackages.R
Lines 120 to 124 in 6c72909
The present hook produces:
After testing different options, all of RStudio's hooks seem to be established after R's own startup procedure that runs through
.Renviron
,.Rprofile
, and.Rhistory
. As a result, there isn't a way to mask code or load a package automatically that won't be overridden by RStudio claimed functions.It would be helpful to have an injection point after the initial delayed registration.
rstudio/src/cpp/r/session/RInit.cpp
Lines 318 to 321 in 8af7304
The use case for the injection is:
Desired behavior
Slient error without overriding CRAN mirror
Noisy error without masked function call when overriding with a bogus CRAN mirror
To recreate the mask shown desired, I've created a
.Rprofile
file that contains:The text was updated successfully, but these errors were encountered: