-
-
Notifications
You must be signed in to change notification settings - Fork 218
Description
PR #1402 addresses the long-standing issue #1247 by masking Rf_error() and preferring Rcpp::stop(). A relatively small number of packages do need a minor adjustment each: often just a removal of an #include <R.h> which may mess with the NO_REMAP macro, or a simple re-run of compileAttributes(). This issue will regroup these changes and is based on the 2025-11-04 reverse dependency run summarized in this text file as mention in this comment.
The checklist will be expanded "in due course" to record PRs (or emailed patches).
Group 1: Including R.h which is best avoided
This is an issue we should be more proactive about (as for example RcppArmadillo is w.r.t. Rcpp.h as it can lead to issues with re-definitions of error() as seen here. It is usually both harmless, and without side-effects -- until it isn't.
The change can be made anytime before or after we land the patch in Rcpp.
- BayesProject: remove
#include <R.h>, patch - GeneralizedWendland: remove
#include <R.h>, patch - locStra: remove
#include <R.h>, patch - LOMAR: remove
#include <R.h>, patch - SAM: remove
#include <R.h>, patch - TDA: remove
#include <R.h>, patch
Group 2: Use -DRCPP_NO_MASK_RF_ERROR if needed
Some packages have a complicated-enough setup, possibly with other callbacks into R, making use of Rf_error() unavoidable. In those cases a #define can be used to restore the status quo. These package can apply the change anytime.
- ggiraph, rely on
-DRCPP_NO_MASK_RF_ERROR, patch - mmrm, rely on
-DRCPP_NO_MASK_RF_ERROR, patch - RTMP: rely on
-DRCPP_NO_MASK_RF_ERROR, patch - s2: rely on
-DRCPP_NO_MASK_RF_ERROR, patch
Group 3: Use custom patch
This mostly consists of applying a custom manual patch that switches to Rcpp::stop().
Group 4: Re-run compileAttributes()
Packages that defined an Rcpp::interface(cpp) have a resulting RcppExports.cpp that checks for correct (function) pointers and calls Rf_error(). An compileAttributes() re-run once the PR has landed will fix this. So these packages may be on hold until we make the change in Rcpp, likely right after the next release so early 2026. They can however apply the patch we prepared if they use the current GitHub version of Rcpp.
- BGVAR: run
compileAttributes(), patch - coga: run
compileAttributes(), patch - comat: run
compileAttributes(), patch - dqrng: run
compileAttributes(), patch - itp: run
compileAttributes(), patch - meteoland: run
compileAttributes(), patch - ravetools: run
compileAttributes(), patch - RcppSimdJson: run
compileAttributes(), patch - rrum: run
compileAttributes(), patch - rucrdtw: run
compileAttributes(), patch - sf: run
compileAttributes(), patch - simcdm: run
compileAttributes(), patch