r-lib / later

Schedule an R function or formula to run after a specified period of time.
https://r-lib.github.io/later
Other
137 stars 27 forks source link

Make later.h compatible with old API #104

Closed wch closed 5 years ago

wch commented 5 years ago

This changes inst/include/later.h so that if a package is built against the new version (I'll call it V2) but run with the old version (V1) of the later DLL, it will continue to work.

It also adds a new C function apiVersion(), which we can use in future versions of inst/include/later.h to check for later.h and later DLL version mismatches.

jcheng5 commented 5 years ago

Can you add a unit test, that includes C++ code that calls apiVersion() and compares it to the constant in inst/include/later.h? Hopefully that's simple to do?

Otherwise, looks great!

wch commented 5 years ago

Just added a test.