Repository navigation
Use devtools::install() instead of pak - #13643
Conversation
|
E2E Tests 🚀 |
There was a problem hiding this comment.
This is working great!
If someone happens to have explicitly put "positron.r.localPackageInstallMethod": "pak" in their settings (which would be weird, but possible), they have a good and appropriate experience. It uses the new default and they get this diagnostic if they go to settings.json to help them update:
I do think we need to update some of the @:r-pkg-development tests and to run them here. It looks like the "R - Verify can open, test, check, install, and restart package" test needs some updates. No need for a further review once those tests are updated and passing!
Looking into the question of "how do I know devtools is available? how did we know pak was available before?" lead to me open #13721
|
I ran just the R package dev e2e tests via workflow dispatch: https://github.com/posit-dev/positron/actions/runs/26307201347/job/77446878272, which passed. As they did in the larger e2e test run. |
Closes #11875
Closes #1733
@:r-pkg-development
When working in an R package, the R: Install R Package and Restart R gesture now defaults to
devtools::install(build = FALSE), instead ofpak::local_install(upgrade = FALSE). The rationale for this switch is laid out in the issue.This also affects the
positron.r.localPackageInstallMethodconfiguration point, wheredevtoolsreplacespak.Release Notes
New Features
devtools::install(build = FALSE), instead ofpak::local_install(upgrade = FALSE). The values of thepositron.r.localPackageInstallMethodsetting can now be"devtools"or"base".Bug Fixes
Validation Steps
positron.r.localPackageInstallMethodconfigured insettings.json.devtools::install(build = FALSE):For discussion:
Should we put a minimum version on devtools, in order to get new, desirable behaviour of
devtools::install()? It seems too strong a requirement and yet people will not have the experience we really want for them if they have older devtools.It feels like the "devtools vs. base" question is bigger than just how to wire up R: Install R Package and Restart R. Are we going to deal with this more holistically? Recall that RStudio has a project-level setting for "Use devtools package functions if available".
Here are all the package dev commands:
r.packageLoaddevtools::load_all()— hardcodedr.packageBuilddevtools::build()— hardcodedr.packageInstalldevtools::install(build = FALSE)orR CMD INSTALL— configurable (this PR)r.packageTestdevtools::test()— hardcoded (task)r.packageTestExplorerr.packageCheckdevtools::check()— hardcoded (task)r.packageDocumentdevtools::document()— hardcodedAre we going to offer devtools vs base for others? In the abstract, it feels like we should. But here in reality it doesn't really make sense. Making this sort of thing clearcut and easier is precisely why devtools & friends exist! Only a couple of these even have a clearcut definition for a base implementation.
Related: the idea of making it possible for an advanced and opinionated user to take full control of these gestures: #3242.