Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2025-12-02 Dirk Eddelbuettel <edd@debian.org>

* R/loadRcppModules.R: Remove file with function deprecated years ago
* man/loadRcppModules-deprecated.Rd: Idem
* NAMESPACE: Remove reference to loadRcppModules()
* man/loadModule.Rd: Idem
* man/Rcpp-deprecated.Rd: Idem
* vignettes/rmd/Rcpp-modules.Rmd: Idem

2025-12-01 Kevin Ushey <kevinushey@gmail.com>

* R/Attributes.R: Update OpenMP plugin for macOS
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ exportMethods(prompt, show, .DollarNames, initialize, "formals<-")
export(Module,
Rcpp.package.skeleton,
populate,
loadRcppModules, # deprecated since Rcpp 0.12.5 released May 2016
setRcppClass,
loadRcppClass,
loadModule,
Expand Down
59 changes: 0 additions & 59 deletions R/loadRcppModules.R

This file was deleted.

13 changes: 2 additions & 11 deletions inst/skeleton/zzz.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@

## Up until R 2.15.0, the require("methods") is needed but (now)
## triggers an warning from R CMD check
#.onLoad <- function(libname, pkgname){
# #require("methods") ## needed with R <= 2.15.0
# loadRcppModules()
#}


## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
## For R 2.15.1 and later the approach shown here works (as opposed to the now removed
## and long-deprecated `loadRcppModules()`. Note that calling loadModule() triggers
## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().
loadModule("NumEx", TRUE)
loadModule("yada", TRUE)
loadModule("stdVector", TRUE)


9 changes: 2 additions & 7 deletions inst/tinytest/testRcppModule/R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#
#.onLoad <- function(libname, pkgname){
# loadRcppModules()
#}

## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
## For R 2.15.1 and later the approach shown here works (as opposed to the now removed
## and long-deprecated `loadRcppModules()`. Note that calling loadModule() triggers
## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().
loadModule("RcppModuleNumEx", TRUE)
loadModule("RcppModuleWorld", TRUE)
loadModule("stdVector", TRUE)

3 changes: 0 additions & 3 deletions man/Rcpp-deprecated.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
}
\details{
\itemize{
\item \code{\link{loadRcppModules}} calls should now be replaced by
\code{\link{loadModule}} calls, one per Module.

\item \code{\link{LdFlags}} and \code{\link{RcppLdFlags}} are no
longer required as no library is provided (or needed) by Rcpp (as it
was up until release 0.10.1).
Expand Down
3 changes: 0 additions & 3 deletions man/loadModule.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ John Chambers
}
\seealso{
\code{\link{setRcppClass}()} to avoid the explicit call.

\code{\link{loadRcppModules}()} for a (deprecated) shotgun procedure to load all
modules.
}
\examples{
\dontrun{
Expand Down
26 changes: 0 additions & 26 deletions man/loadRcppModules-deprecated.Rd

This file was deleted.

30 changes: 0 additions & 30 deletions vignettes/rmd/Rcpp-modules.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1236,36 +1236,6 @@ The `loadModule` function has an argument `what` to control which objects are
exposed in the package namespace. The special value `TRUE` means that all
objects are exposed.

### Deprecated legacy method using loadRcppModules

Prior to release 0.9.11, where `loadModule` was introduced,
loading all functions and classes from a module
into a package namespace was achieved using the `loadRcppModules` function
within the `.onLoad` body.

```{r, eval=FALSE}
.onLoad <- function(libname, pkgname) {
loadRcppModules()
}
```

This will look in the package's `DESCRIPTION` file for the `RcppModules`
field, load each declared module and populate their contents into the
package's namespace. For example, a package defining modules
`yada`, `stdVector`, `NumEx` would have this declaration:

```
RcppModules: yada, stdVector, NumEx
```

The `loadRcppModules` function has a single argument `direct`
with a default value of `TRUE`. With this default value, all content
from the module is exposed directly in the package namespace. If set to
`FALSE`, all content is exposed as components of the module.

Note: This approach is **deprecated** as of Rcpp 0.12.5, and now triggers a
warning message. Eventually this function will be withdrawn.

### Just expose the module

Alternatively to exposing a module's content via `loadModule`,
Expand Down