Add package management RPC functions#1084
Conversation
Add new RPC endpoints for the Positron packages pane: - `pkg_install`: Install packages via pak or base R - `pkg_list`: List installed packages with metadata - `pkg_update_all`: Update all outdated packages - `pkg_uninstall`: Remove packages and unload namespaces - `pkg_search`: Search CRAN for packages by name - `pkg_search_versions`: Get available versions for a package Each function supports both `pak` and `base` methods to allow flexibility depending on user preference and environment.
juliasilge
left a comment
There was a problem hiding this comment.
This is working great!
Before you merge this, can you add some comments to each of these new functions to note that they are for use in the Packages Pane with the RPackageManager? I don't want us to get confused in this file between .ps.rpc.install_packages and .ps.rpc.pkg_install. Or maybe add comments and make the prefix for each of these new functions .ps.rpc.pkg_pane_install() and similar? If you're up for pushing a change to both branches.
pkg_install, pkg_uninstall, and pkg_update_all are no longer used - the Positron R extension now calls pak/base R functions directly via execute() for better console output.
4d10e5f to
170d2dd
Compare
|
The strategy changed, so I've removed the package mutation functions. I also moved everything to its own file to keep it separate. Positron will now use For install/uninstall it's really just switching between base R and pak and that is now performed in Positron. However, for pak's update all, we still need to call into Ark for |
juliasilge
left a comment
There was a problem hiding this comment.
This is working beautifully! 🤩
Co-authored-by: Julia Silge <[email protected]>
This PR is to move R code from Positron into Ark. This provides two key features:
LanguageRuntimeSession.callMethod()function to execute this code and return the result.Related tickets:
posit-dev/positron#12076
posit-dev/positron#11842
Add new RPC endpoints for the Positron packages pane:
pkg_install: Install packages via pak or base Rpkg_list: List installed packages with metadatapkg_update_all: Update all outdated packagespkg_uninstall: Remove packages and unload namespacespkg_search: Search CRAN for packages by namepkg_search_versions: Get available versions for a packageEach function supports both
pakandbasemethods to allow flexibility depending on user preference and environment.Related Positron PR that consumes this change: posit-dev/positron#12280