Skip to content

R: configure inclusion/exclusion of runtimes #6205

Closed
@sharon-wang

Description

Implementation Summary

This is the R equivalent to #3574.

A new option will be added to "exclude" R interpreters, which the user can configure via the Settings UI or via the user settings.json directly. As such, these settings will be applicable at the workspace and/or user scopes, and can be preset by a workbench admin via positron-user-settings.json. We already have options for specifying "includes" for R interpreters.

add positron.r.interpreters.exclude settings option

  • List of strings, where each string is a path to a specific interpreter or a directory to NOT search for interpreters
  • Draft description: List of interpreters to exclude from the available Python interpreters shown in Positron. You can specify the file path of a specific interpreter, or a directory path that we should not search for interpreters.
  • Default: null

R interpreter includes

  • we already have positron.r.customBinaries and positron.r.customRootFolders which allow "includes" to be specified
  • see https://positron.posit.co/r-installations.html#customizing-r-discovery for more info
  • current setting descriptions
    • customBinaries: “List of additional R binaries. If you want to use an R installation that is not automatically discovered, provide the path to its binary here. For example, on Windows this might look like C:/some/unusual/location/R-4.4.1/bin/x64/R.exe.”
    • customRootFolders: “List of additional folders to search for R installations. These folders are searched after and in the same way as the default folder for your operating system (e.g. C:/Program Files/R on Windows).”

Implementation Considerations

What if a user specifies invalid paths, the interpreters or directories don’t exist, or something else is wrong with the user’s input in settings?

  • If any of these are invalid for any reason (i.e. broken path, does not exist), we will indicate as such in logs and/or via Notification toasts at the time of discovery, as there isn’t very robust input validation in the Settings UI.
  • May need some additional UI/notifications to cover the case where this causes discovery to find nothing. “Could not find any interpreters included in the setting python.interpreters.override. Would you like Positron to try again, without the setting?”
    • We have a Positron core toast “no interpreters found”, but maybe not for Python or R yet

What if there is overlap between the paths specified in includes/excludes?

  • excludes will take precedence over includes

PR: #6472

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions