Skip to content

Commit b83944e

Browse files
authored
Remove deprecated loadRcppModules (closes #1415) (#1416)
* Remove deprecated loadRcppModules (closes #1415) * Tweak ChangeLog whitespace following rebase following #1416 merge * Remove section about deprecated loadRcppModules() * Remove commented-out mentions of loadRcppModules()
1 parent 551c466 commit b83944e

File tree

9 files changed

+13
-140
lines changed

9 files changed

+13
-140
lines changed

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2025-12-02 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/loadRcppModules.R: Remove file with function deprecated years ago
4+
* man/loadRcppModules-deprecated.Rd: Idem
5+
* NAMESPACE: Remove reference to loadRcppModules()
6+
* man/loadModule.Rd: Idem
7+
* man/Rcpp-deprecated.Rd: Idem
8+
* vignettes/rmd/Rcpp-modules.Rmd: Idem
9+
110
2025-12-01 Kevin Ushey <[email protected]>
211

312
* R/Attributes.R: Update OpenMP plugin for macOS

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ exportMethods(prompt, show, .DollarNames, initialize, "formals<-")
1616
export(Module,
1717
Rcpp.package.skeleton,
1818
populate,
19-
loadRcppModules, # deprecated since Rcpp 0.12.5 released May 2016
2019
setRcppClass,
2120
loadRcppClass,
2221
loadModule,

R/loadRcppModules.R

Lines changed: 0 additions & 59 deletions
This file was deleted.

inst/skeleton/zzz.R

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11

2-
## Up until R 2.15.0, the require("methods") is needed but (now)
3-
## triggers an warning from R CMD check
4-
#.onLoad <- function(libname, pkgname){
5-
# #require("methods") ## needed with R <= 2.15.0
6-
# loadRcppModules()
7-
#}
8-
9-
10-
## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
2+
## For R 2.15.1 and later the approach shown here works (as opposed to the now removed
3+
## and long-deprecated `loadRcppModules()`. Note that calling loadModule() triggers
114
## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().
125
loadModule("NumEx", TRUE)
136
loadModule("yada", TRUE)
147
loadModule("stdVector", TRUE)
15-
16-
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
#
2-
#.onLoad <- function(libname, pkgname){
3-
# loadRcppModules()
4-
#}
5-
6-
## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
1+
## For R 2.15.1 and later the approach shown here works (as opposed to the now removed
2+
## and long-deprecated `loadRcppModules()`. Note that calling loadModule() triggers
73
## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().
84
loadModule("RcppModuleNumEx", TRUE)
95
loadModule("RcppModuleWorld", TRUE)
106
loadModule("stdVector", TRUE)
11-

man/Rcpp-deprecated.Rd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
}
88
\details{
99
\itemize{
10-
\item \code{\link{loadRcppModules}} calls should now be replaced by
11-
\code{\link{loadModule}} calls, one per Module.
12-
1310
\item \code{\link{LdFlags}} and \code{\link{RcppLdFlags}} are no
1411
longer required as no library is provided (or needed) by Rcpp (as it
1512
was up until release 0.10.1).

man/loadModule.Rd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ John Chambers
8080
}
8181
\seealso{
8282
\code{\link{setRcppClass}()} to avoid the explicit call.
83-
84-
\code{\link{loadRcppModules}()} for a (deprecated) shotgun procedure to load all
85-
modules.
8683
}
8784
\examples{
8885
\dontrun{

man/loadRcppModules-deprecated.Rd

Lines changed: 0 additions & 26 deletions
This file was deleted.

vignettes/rmd/Rcpp-modules.Rmd

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,36 +1236,6 @@ The `loadModule` function has an argument `what` to control which objects are
12361236
exposed in the package namespace. The special value `TRUE` means that all
12371237
objects are exposed.
12381238

1239-
### Deprecated legacy method using loadRcppModules
1240-
1241-
Prior to release 0.9.11, where `loadModule` was introduced,
1242-
loading all functions and classes from a module
1243-
into a package namespace was achieved using the `loadRcppModules` function
1244-
within the `.onLoad` body.
1245-
1246-
```{r, eval=FALSE}
1247-
.onLoad <- function(libname, pkgname) {
1248-
loadRcppModules()
1249-
}
1250-
```
1251-
1252-
This will look in the package's `DESCRIPTION` file for the `RcppModules`
1253-
field, load each declared module and populate their contents into the
1254-
package's namespace. For example, a package defining modules
1255-
`yada`, `stdVector`, `NumEx` would have this declaration:
1256-
1257-
```
1258-
RcppModules: yada, stdVector, NumEx
1259-
```
1260-
1261-
The `loadRcppModules` function has a single argument `direct`
1262-
with a default value of `TRUE`. With this default value, all content
1263-
from the module is exposed directly in the package namespace. If set to
1264-
`FALSE`, all content is exposed as components of the module.
1265-
1266-
Note: This approach is **deprecated** as of Rcpp 0.12.5, and now triggers a
1267-
warning message. Eventually this function will be withdrawn.
1268-
12691239
### Just expose the module
12701240

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

0 commit comments

Comments
 (0)