You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR] Use base-R standalone files for functionality copied in Positron? #2596
It might be helpful if the functionality we copied over to Ark for tool calls in Positron was implemented in base-R only standalone files. This way the functionality is updated and tested in one place, usethis can be used to manage updates (https://usethis.r-lib.org/reference/use_standalone.html), and we wouldn't need to adapt the code to base R when we need to update.
You can see which functions we adapted in posit-dev/ark#868 (file pandoc.R).
This is just a suggestion, I'd understand if you think this would be impractical or too constraining on your end.
Thanks for the suggestion. As this is directly Pandoc only related, I wonder if this should be in https://github.com/cderv/pandoc (which I did not yet moved to rstudio or posit-dev org... 🤔 I could).
However, rmarkdown may be the best place as the function seems to clearly be adapted from this package. (find_pandoc() logic). In pandoc R 📦 this is only used in pandoc_activate(rmarkdown = TRUE). Otherwise the logic is different.
This is just a suggestion, I'd understand if you think this would be impractical or too constraining on your end.
I am fine with this idea.
Would that mean we would use the standalone function and replace current implementation of find_pandoc() or pandoc_convert() ?
Since the standalone file is in the original repo and has clear dependency goals (for example only base R) that the maintainer abides to, this makes it easy to update upstream changes from downstream.
Would that mean we would use the standalone function and replace current implementation of find_pandoc() or pandoc_convert() ?
yep that's usually how it works, the package just uses the definitions from the standalone files.
So there have constraint to abide to. 🤔
yep in this case the constraint would be using only base R in that file with long term compatibility with old R versions. That's mainly why I mentioned to not worry about this if too impractical on your end.
Activity
cderv commentedon Jul 10, 2025
Thanks for the suggestion. As this is directly Pandoc only related, I wonder if this should be in https://github.com/cderv/pandoc (which I did not yet moved to rstudio or posit-dev org... 🤔 I could).
However, rmarkdown may be the best place as the function seems to clearly be adapted from this package. (
find_pandoc()logic). In pandoc R 📦 this is only used inpandoc_activate(rmarkdown = TRUE). Otherwise the logic is different.I am fine with this idea.
Would that mean we would use the standalone function and replace current implementation of
find_pandoc()orpandoc_convert()?How does that work in other packages ?
In posit-dev/ark#868 I read
So there have constraint to abide to. 🤔
lionel- commentedon Jul 10, 2025
yep that's usually how it works, the package just uses the definitions from the standalone files.
yep in this case the constraint would be using only base R in that file with long term compatibility with old R versions. That's mainly why I mentioned to not worry about this if too impractical on your end.