RSQLite
RSQLite copied to clipboard
Replace Rcpp by cpp11
I think it might be worth switching from Rcpp to cpp11. See Motivations for cpp11 for some reasons.
Compilation is now much faster (~28s vs ~52s) and I think it is mostly easier to work with cpp11.
To Do
- [ ]
busy_callback_helper()-> how to catch eval error and interrupt? - [ ]
result_release()-> make this work withcpp11::external_pointer - [ ] find replacement for
Rcpp::warningcall(R_NilValue, std::string("Ignoring remaining part of query: ") + tail); - [ ] figure out why
cpp11::warning()crashes - [ ] adapt
astyle() - [ ]
get_column_info()can probably directly usecpp11::dataframe - [ ] maybe remove some
STRICT_R_HEADERSandR_NO_REMAP
Thanks! Compilation on gcc fails, could you please take a look?
I could not reproduce it locally so I just hope this works.
Thanks, appreciated.
on.exit(after = ) requires recent-ish R, we can use withr::defer() instead to fix the oldrel-4 failures.
I've added a test for the interrupt behavior to https://github.com/r-dbi/RSQLite/pull/401. Is this problem solvable, do we need a change to cpp11? Are there any downsides to vendoring the cpp11 package?
pch.h helps speed up building locally, through precompiled headers. It's important that this is the first preprocessor statement in each module. You can edit this file instead of making the changes in all files. (I need to remember how this is used, though.)
I don't fully understand the other check items yet.
I'll finish this, thanks!