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

Dirk Eddelbuettel edd at debian.org
Thu Apr 2 14:40:48 CEST 2026


On 2 April 2026 at 11:22, Kurt Hornik wrote:
| >>>>> Dirk Eddelbuettel writes:
| 
| > On 1 April 2026 at 17:33, Iñaki Ucar wrote:
| > | Now that we are at it... We still have a call to R_NamespaceRegistry [1].
| > | Is there any alternative?
| > | 
| > | [1]
| > | https://github.com/RcppCore/Rcpp/pull/1466/changes#diff-90c53531b5034b1079e9d44ed158400afe99b0eb55850ba37eba05af57775db3
| 
| > Maybe the newly added R_getRegisteredNamespace can help us here.  Came
| > through the RSS feed of R NEWS last night as
| 
| >  - New function ‘R_getRegisteredNamespace’ finds and returns the namespace
| >    environment registered for a name, or ‘R_NilValue’ if none is found. 
| 
| > and appears to cover the same ground as we do here. From commit
| > r89746.
| 
| Great, thanks!  Do you meanwhile have a non-release hotfix which also no
| longer uses R_NamespaceRegistry?

I made the two-line check of conditioning on 4.6.0, not 4.5.0, and dropping
it in. The sole segment where it appears is now changed to

        Function_Impl(const std::string& name, const std::string& ns) {
#if R_VERSION < R_Version(4,6,0)
            Shield<SEXP> env(Rf_findVarInFrame(R_NamespaceRegistry, Rf_install(ns.c_str())));
            if (env == R_UnboundValue)
                stop("there is no namespace called \"%s\"", ns);
#else
            Shield<SEXP> env(R_getRegisteredNamespace(ns.c_str()));
            if (env == R_NilValue)
                stop("there is no namespace called \"%s\"", ns);
#endif
            get_function(name, env);
        }

Tests ok with R-release and R-devel. As we haven't released this non-release,
I kept it at 1.1.1-1. New files in the same location

   https://dirk.eddelbuettel.com/tmp/Rcpp_1.1.1-1.tar.gz

Descriptives:

   $ ls -l Rcpp_1.1.1-1.tar.gz 
   -rw-r--r-- 1 edd edd 1853821 Apr  2 07:33 Rcpp_1.1.1-1.tar.gz
   $ md5sum Rcpp_1.1.1-1.tar.gz 
   1912c5ee606b73701e2e32dcd78fc5c4  Rcpp_1.1.1-1.tar.gz
   $ sha256sum Rcpp_1.1.1-1.tar.gz 
   f624f484fd6605a58984d731578aa1648025c7e5bc992d204d5fd5cc19063814  Rcpp_1.1.1-1.tar.gz
   $ 

Dirk
 
| Best
| -k
| 
| > Dirk
|  
| > | Best,
| > | Iñaki
| > | 
| > | On Tue, 31 Mar 2026 at 22:16, Dirk Eddelbuettel <edd at debian.org> wrote:
| > | 
| > | >
| > | > Ok, did this prior to the faculty meeting as one should and now have a
| > | > hotfix
| > | > non-release Rcpp 1.1.1-1 here:
| > | >
| > | >   https://dirk.eddelbuettel.com/tmp/Rcpp_1.1.1-1.tar.gz
| > | >
| > | > It was constructed by taking the last release 1.1.1, and manually patching
| > | > in
| > | > the the desired (pending) changes in PR #1466 ("R_UnboudedValue") plus one
| > | > also needed change from PR #1460 ("ENCLOS").
| > | >
| > | > It passes R CMD check --as-cran and R-devel CMD check --as-cran (using
| > | > current r89754)
| > | >
| > | > Dirk
| > | >
| > | >
| > | > Details and checksums below
| > | >
| > | >   $ md5sum Rcpp_1.1.1-1.tar.gz
| > | >   283907c6026efe97b2b666ef7d94edca  Rcpp_1.1.1-1.tar.gz
| > | >   $ sha256sum Rcpp_1.1.1-1.tar.gz
| > | >   ddd2bc03a910fa5102d0760493f4e2ace9cc8ea0d2038134be163bb7b3ebfdf4
| > | > Rcpp_1.1.1-1.tar.gz
| > | >   $ ls -l Rcpp_1.1.1-1.tar.gz
| > | >   -rw-r--r-- 1 edd edd 1853693 Mar 31 15:01 Rcpp_1.1.1-1.tar.gz
| > | >   $
| > | >
| > | >
| > | > --
| > | > dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
| > | > _______________________________________________
| > | > Rcpp-devel mailing list
| > | > Rcpp-devel at lists.r-forge.r-project.org
| > | > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
| > | >
| > | 
| > | 
| > | -- 
| > | *Iñaki Úcar*
| > | Assistant Professor of Statistics
| > | Director of the Master in Computational Social Science
| > | <https://www.uc3m.es/master/computational-social-science>
| > | 
| > | Department of Statistics | Big Data Institute
| > | Universidad Carlos III de Madrid
| > | Av. de la Universidad 30, 28911 Leganés, Spain
| > | Office: 7.3.J25, Tel: +34 916248804
| 
| > -- 
| > dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

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


More information about the Rcpp-devel mailing list