Skip to content
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

R: configure override of available runtimes #6206

Open
Tracked by #6202
sharon-wang opened this issue Jan 31, 2025 · 0 comments
Open
Tracked by #6202

R: configure override of available runtimes #6206

sharon-wang opened this issue Jan 31, 2025 · 0 comments
Assignees
Labels
area: runtimes Issues related to Language Runtimes area: workbench Issues related to Workbench category. enhancement New feature or request lang: r theme: runtime startup

Comments

@sharon-wang
Copy link
Member

sharon-wang commented Jan 31, 2025

Implementation Summary

This is the R equivalent to #6203.

A new option will be added to "override" the paths to search for 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.

add r.interpreters.override settings option

  • List of string paths, which overrides the list of interpreters that we make available in Positron
  • Draft description: These interpreters will be the only ones we include in the set of R interpreters we automatically discover
  • Default: empty array

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 r.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 a user has interpreter includes, excludes AND overrides specified?

  • Overrides will take precedence over any specified includes and excludes, so if a user has all three specified or one of includes/excludes specified along with overrides, we will only use the overrides.
  • How to surface this to the user?
    • INVESTIGATE: can we update the setting descriptions for includes/excludes to indicate that the override option will take precedence when the override option is set?
    • include in the setting description that includes/excludes will be overridden by overrides; and in overrides description, include that it will replace any specifications in includes/excludes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: runtimes Issues related to Language Runtimes area: workbench Issues related to Workbench category. enhancement New feature or request lang: r theme: runtime startup
Projects
None yet
Development

No branches or pull requests

1 participant