Skip to content

Collapse the r::sexp / RFunction UTF-8 variants that now match the defaults #19663

Description

@kevinushey

Follow-up to #19640, raised in review there.

#19640 made r::sexp::create() mark strings UTF-8 and asString() / extract() read them as UTF-8 by default. The explicit UTF-8 variants now behave the same as the defaults:

  • r::sexp::asUtf8String() (same as asString())
  • r::sexp::createUtf8(), all three overloads (same as create())
  • RFunction::addUtf8Param() (same as addParam())
  • RFunction::callUtf8() (same as call())
  • the asUtf8 parameter on the string extract() overloads, which now defaults to true; no call site passes false

There are 91 call sites of the first four, plus a handful of extract(..., true) calls. Keeping both spellings suggests they differ. They could be collapsed into the defaults and the variants removed (createUtf8(const FilePath&) has no create() counterpart, so it would need one or stay).

This should wait until #19640 is merged.

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

Metadata

Metadata

Assignees

Labels

tech debt

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions