[R-pkg-devel] How ton print in the console from Rcpp

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Wed Nov 16 17:10:00 CET 2022


On 14 November 2022 at 16:34, Elysée Aristide wrote:
| I was convinced that the issue is local. The warning message only appears
| on MAC.
| I did not try with another computer. I used CRAN macbuilder service and got
| the warning message. I guess this is also the computer CRAN uses.

Some further (and very patient) probing on GitHub in a related (older) issue
reveals that I was wrong here. My thanks for to Ivan for his patience, and
apologies to Elysée: it was indeed the combination of inclusing RcppArmadillo
prior to RcppNumerical and the combination of the former undefining NDEBUG
and the latter having assert() statement that caused your trouble.

And the `#undef NDEBUG` in RcppArmadillo, while not causing harm among the
1000+ packages on CRAN I can test against (and do test against each and every
time we make changes) simply does not do anything useful for RcppArmadillo or
Armadillo. But it leaves a possible side effect in packages using `assert()`
as RcppNumerical does.

So having tested a (conditional) removal (which one can override with a new
env.var. if one needs to) in another full reverse-dependencies run (which,
unsurprisingly, shows no ill effect as it showed no ill effect of having the
#undef) I will make that change on GitHub which will go into the next release
(which we aim to have less than monthly to comply with CRAN's desire of 'no
more than six releases in six months).

Thanks again to Ivan.

Cheers, Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-package-devel mailing list