Provide R < 4.6 entry points for older versions of data.table in atime tests#7731
Provide R < 4.6 entry points for older versions of data.table in atime tests#7731
data.table in atime tests#7731Conversation
At least the following entry points were used by older data.table
versions and need to be available to reproduce benchmarks:
void SETLENGTH(SEXP x, R_xlen_t n);
R_xlen_t TRUELENGTH(SEXP x);
void SET_TRUELENGTH(SEXP x, R_xlen_t n);
void SET_GROWABLE_BIT(SEXP);
int LEVELS(SEXP);
int NAMED(SEXP);
#define isFrame(x) isDataFrame(x)
#define GetOption(x, none) GetOption1(x)
Since there's no more USE_RINTERNALS, STRING_PTR_RO is no longer a macro.
Older versions of data.table access elements in [LENGTH(x), max(LENGTH(x), TRUELENGTH(x))), which is not a read overflow but forbidden nowadays. Skip the length checks.
Since we USE_RINTERNALS, we get old macros for MAYBE_SHARED(), NO_REFERENCES() from Rinternals.h that rely on REFCNT() existing.
|
Generated via commit a3d2921 Download link for the artifact containing the test results: ↓ atime-results.zip
|
|
Wow Ivan! |
tdhock
left a comment
There was a problem hiding this comment.
One thing before merging, can you please add a comment to explain how you landed on this result? (I see several commits in this branch, suggesting that some trials did not work. Maybe explain what did not work and what you learned from that? Or if it is too complex for a comment, provide a link to a blog etc? Or do you think the explanation not necessary?)
|
The process was mostly try to run tests, fix an error (following the approach of #6640), repeat. I had to backtrack once after I defined Compilation or linking errors were easiest to fix. For example, An interesting workaround is the Some problems were only visible as compilation warnings. For example, Another interesting workaround is An old version of |
|
This is great! I wonder if other packages would benefit from something similar. Would adding this to {backports} or as a standalone package make sense? |

Fixes: #7693
With these changes,
atime::atime_pkg()passes for me on R-4.6.0 and R-devel.