Skip to content

fix use of non-API calls to R's C code #1615

@paciorek

Description

@paciorek

CRAN is now flagging this issue with a deadline of April 9.

Version: 1.4.1
Check: compiled code
Result: NOTE
  File ‘nimble/libs/nimble.so’:
    Found non-API calls to R: ‘Rf_findVar’, ‘Rf_findVarInFrame’
  
  Compiled code should not call non-API entry points in R.
  
  See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
  and section ‘Moving into C API compliance’ for issues with the use of
  non-API entry points.

From quick glance at the docs, it looks like we can replace those non-API calls. The docs say "Use R_getVar or R_getVarEx, added in R 4.5.0. In some cases using eval may suffice. "

Rcpp discussed this, making the comment about using the old code for older R versions. I guess we need to think about whether we are ok with having nimble 1.4.2 require R>=4.5.0. Probably?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions