[Rcpp-devel] [External] Re: CRAN package Rcpp

Kurt Hornik Kurt.Hornik at wu.ac.at
Tue Mar 31 18:25:26 CEST 2026


>>>>> luke-tierney  writes:

Great, thanks.  So this is ready for a hot fix release, or requires more
testing on our end?

Best
-k

> On Tue, 31 Mar 2026, Dirk Eddelbuettel wrote:
>> 
>> Hi Kurt,
>> 
>> On 31 March 2026 at 09:53, Kurt Hornik wrote:
>> | Dear Dirk,
>> |
>> | I hope you are getting some kind of Easter Break :-)  [I don't.]
>> 
>> Nope :-/
>> 
>> My wife's in Paris for a few days, giving a seminar at the OECD today (and
>> had a seminar to give in Canada too last week, honoring one of her late
>> mentors and then colleague).  I am at home as it is a teaching term for me
>> and prefer not to leave for two weeks.
>> 
>> | We could really use your help on the following.  Last week Luke
>> | committed the last round of non-API changes, this time addressing the
>> | non-API *variables*.  As a consequence, we now get close to 400 CRAN
>> | package NOTE the use of R_UnboundValue (plus around 40 NOTE the use of
>> | R_NamespaceRegistry, and a few more), where most of the R_UnboundValue
>> | uses seem to be via Rcpp.
>> 
>> We know. I noticed a few days ago and filed
>> 
>> https://github.com/RcppCore/Rcpp/issues/1465
>> 
>> which Iñaki addressed already in the (now pending) PR
>> 
>> https://github.com/RcppCore/Rcpp/pull/1466
>> 
>> but it so happens that we had two PRs aheead of it in the reverse dependency
>> queue.  One has been taken care of, the other is running now.
>> 
>> | Specifically, you have e.g.
>> |
>> | #if R_VERSION < R_Version(4,5,0)
>> |            SEXP res = Rf_findVarInFrame( env, nameSym ) ;
>> | #else
>> |            SEXP res = R_getVarEx(nameSym, env, FALSE, R_UnboundValue);
>> | #endif
>> |            if( res == R_UnboundValue ) return R_NilValue ;
>> |
>> | where indeed Rf_findVarInFrame returns R_UnboundValue "if not found",
>> | but R_getVarEx could use any value, e.g. an R R_NilValue or a C NULL.
>> |
>> | Changing to something like
>> |
>> | #if R_VERSION < R_Version(4,5,0)
>> |            SEXP res = Rf_findVarInFrame( env, nameSym ) ;
>> |            if( res == R_UnboundValue ) return R_NilValue ;
>> | #else
>> |            SEXP res = R_getVarEx(nameSym, env, FALSE, NULL);
>> |     	   if( res == NULL ) return R_NilValue ;
>> | #endif
>> |
>> | will avoid using the non-API R_UnboundValue for current versions of R.
>> 
>> Iñaki's PR actually removes both branches (in two spots), and alters a third
>> similarly. Maybe Luke can glance at that and comment?
>> 
>> | Luke has a patched version of Rcpp with these changes, with which the
>> | number of package for which we NOTE the use of R_UnboundValue goes down
>> | to about 80, which is a major step forward.
>> |
>> | I know you prefer that we do not NMU Rcpp: so could Luke send you his
>> | patches and you kindly provide a new Rcpp hot-fix release with these
>> | patches?  That would really help us move forward, and be very much
>> | appreciated.
>> 
>> We would welcome a patch by Luke at the repo (or by email) so that we could
>> review it.

> The changes in PR1466 look good. I'll use that version for my next
> check round.

> Thanks,

> luke

>> 
>> I presume a CRAN hotfix would ideally be against the last released Rcpp
>> version now on CRAN, our PRs get of course applied to the main branch which
>> by now is a few PRs ahead. We probably should not comingle this.
>> 
>> The current reverse depends check should be finished in 1 1/2 days.
>> 
>> Cheers, Dirk
>> 
>> 

> -- 
> Luke Tierney
> Ralph E. Wareham Professor of Mathematical Sciences
> University of Iowa                  Phone:             319-335-3386
> Department of Statistics and        Fax:               319-335-3017
>     Actuarial Science
> 241 Schaeffer Hall                  email:   luke-tierney at uiowa.edu
> Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu/


More information about the Rcpp-devel mailing list