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

Recent changes to getVersion() cause some RStudio addins to fail in Positron #307

Closed
ateucher opened this issue Oct 18, 2024 · 2 comments
Closed

Comments

@ateucher
Copy link

I use codegrip::addin_reshape() and styler:::style_active_file() in both RStudio and Positron (bound to keyboard shortcuts). Both of these functions call rstudioapi::modifyRange(), which in turn calls rstudioapi::getVersion().

Recent changes in 3bd91a6 and 6a71e69 mean that getVersion() fails outside of RStudio:

In Positron:

rstudioapi::modifyRange(Map(c, 1:5, 1), paste0("#", sample(letters, 5), " "))
#> Error in base$.Call("rs_rstudioVersion", PACKAGE = "(embedding)"): "rs_rstudioVersion" not available for .Call() for package "(embedding)"

rstudioapi::getVersion()
#> Error in base$.Call("rs_rstudioVersion", PACKAGE = "(embedding)"): "rs_rstudioVersion" not available for .Call() for package "(embedding)"

Created on 2024-10-18 with reprex v2.1.1

I don't think these addins are officially supported in Positron, but I know there has been some work to ensure a certain subset of rstudioapi functions work in Positron, including modifyRange() (e.g., posit-dev/positron#1312 and posit-dev/positron#2582).

Apologies if this should be a Positron issue rather than rstudioapi.

Thanks!

@ateucher
Copy link
Author

Reported in Ark, as I believe that's a better place for this

@kevinushey
Copy link
Contributor

Thanks! I followed up with the ark team as well; they'll be implementing the necessary APIs on their side as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants