Skip to content

[FR] Use base-R standalone files for functionality copied in Positron? #2596

Open

Description

@lionel-

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.

Activity

  1. cderv commented on Jul 10, 2025

    @cderv
    Collaborator

    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() ?

    How does that work in other packages ?

    In posit-dev/ark#868 I read

    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.

    So there have constraint to abide to. 🤔

  2. lionel- commented on Jul 10, 2025

    @lionel-
    Author

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions