RConsortium / S7

S7: a new OO system for R
https://rconsortium.github.io/S7
Other
397 stars 33 forks source link

`PRCODE(.)` and `SET_PRVALUE()` are not API #471

Open mmaechler opened 2 days ago

mmaechler commented 2 days ago

The first is if (PRCODE(arg) == R_MissingArg) { .... } here https://github.com/RConsortium/S7/blob/b5cf389d7c6dc676c2d938e2feac6d7ec04d0c50/src/method-dispatch.c#L53 and basically identically (with a != instead of ==) also on line 156 .

As we know, we (R core) have "solidified" R's C API recently, and visibly in R-devel (to be released in Spring 2025), and with (somewhat extended) tests, one now gets

* checking compiled code ... NOTE
File ‘S7/libs/S7.so’:
  Found non-API calls to R: ‘PRCODE’, ‘SET_PRVALUE’

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.

The WRE section is https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Moving-into-C-API-compliance

t-kalinowski commented 2 days ago

Is there an API for working with promises?

I might be mistaken, but I don't think there are API entrypoints yet for working with promises. As far as I can tell, there is currently no approved way to: