From 6f7639d512f37901dc595c73658b1372d0d816df Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Sat, 28 Jul 2018 07:50:05 -0500 Subject: [PATCH 1/2] deprecate LdFlags() and RcppLdFlags() plus some non-exported variants --- ChangeLog | 11 ++++++++++- NAMESPACE | 8 +++----- R/RcppLdpath.R | 24 ++++++++++++++++++------ man/Rcpp-deprecated.Rd | 11 ++++++++++- man/RcppLdFlags.Rd | 18 ++++++++++-------- 5 files changed, 51 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 00f56c08f..6ca7172b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,15 @@ +2018-07-28 Dirk Eddelbuettel + + * R/RcppLdpath.R (RcppLdPath, RcppLdFlags, CxxFlags, RcppLdFlags) + (RcppCxx0xFlags): Marked as deprecated + + * man/Rcpp-deprecated.Rd: Add exported functions LdFlags() and + RcppLdFlags() as deprecated + * man/RcppLdFlags.Rd: Idem + 2018-07-27 Dirk Eddelbuettel - * man/loadRcppModules-deprecated.Rd: Fix typo: was deprecated in + * man/loadRcppModules-deprecated.Rd: Fix typo; was deprecated in 0.12.5, not 0.16.5 which does not exist 2018-07-26 Dirk Eddelbuettel diff --git a/NAMESPACE b/NAMESPACE index 2c7e21078..07694e7e4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -16,7 +16,7 @@ exportMethods(prompt, show, .DollarNames, initialize, "formals<-") export(Module, Rcpp.package.skeleton, populate, - loadRcppModules, # deprecated since Rcpp 0.12.5 + loadRcppModules, # deprecated since Rcpp 0.12.5 released May 2016 setRcppClass, loadRcppClass, loadModule, @@ -26,8 +26,8 @@ export(Module, sourceCpp, compileAttributes, registerPlugin, - RcppLdFlags, - LdFlags, + RcppLdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 + LdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 demangle, sizeof, cpp_object_initializer, @@ -39,5 +39,3 @@ S3method(format, Rcpp_stack_trace) S3method(str, Rcpp_stack_trace) S3method(print, Rcpp_stack_trace) exportClass(RcppClass) - - diff --git a/R/RcppLdpath.R b/R/RcppLdpath.R index 222fd89ae..5548e22ca 100644 --- a/R/RcppLdpath.R +++ b/R/RcppLdpath.R @@ -1,4 +1,4 @@ -# Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois +# Copyright (C) 2010 - 2018 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp. # @@ -23,6 +23,8 @@ Rcpp.system.file <- function(...){ ## Use R's internal knowledge of path settings to find the lib/ directory ## plus optinally an arch-specific directory on system building multi-arch RcppLdPath <- function() { + .Deprecated(msg=paste("This function is now deprecated as it has not", + "been needed since 2013.")) "" } @@ -33,8 +35,12 @@ RcppLdPath <- function() { ## Updated Jan 2010: We now default to static linking but allow the use ## of rpath on Linux if static==FALSE has been chosen ## Note that this is probably being called from LdFlags() -## Updated Nov 2013: We no longer build a library. This should be deprecated. -RcppLdFlags <- function() { "" } +## Updated Nov 2013: We no longer build a library. This should be deprecated. +RcppLdFlags <- function() { + .Deprecated(msg=paste("This function is now deprecated as it has not", + "been needed since 2013.")) + "" +} # indicates if Rcpp was compiled with GCC >= 4.3 canUseCXX0X <- function() { TRUE } # .Call( "canUseCXX0X", PACKAGE = "Rcpp" ) @@ -52,8 +58,11 @@ RcppCxxFlags <- function(cxx0x=FALSE) { ## Shorter names, and call cat() directly ## CxxFlags defaults to no using c++0x extensions are these are considered non-portable CxxFlags <- function(cxx0x=FALSE) { + .Deprecated(msg=paste("This function is now deprecated as R uses minimally", + "viable compilers om all platforme.")) cat(RcppCxxFlags(cxx0x=cxx0x)) } + ## LdFlags defaults to static linking on the non-Linux platforms Windows and OS X LdFlags <- function() { cat(RcppLdFlags()) @@ -64,11 +73,14 @@ RcppCapabilities <- capabilities <- function() .Call( rcpp_capabilities ) # compile, load and call the cxx0x.c script to identify whether # the compiler is GCC >= 4.3 -RcppCxx0xFlags <- function(){ +RcppCxx0xFlags <- function() { + .Deprecated(msg=paste("This function is now deprecated as R uses minimally", + "viable compilers om all platforme.")) script <- Rcpp.system.file( "discovery", "cxx0x.R" ) flag <- capture.output( source( script ) ) flag } -Cxx0xFlags <- function() cat( RcppCxx0xFlags() ) - +Cxx0xFlags <- function() { + cat( RcppCxx0xFlags() ) +} diff --git a/man/Rcpp-deprecated.Rd b/man/Rcpp-deprecated.Rd index ebbf3b6aa..645b857cd 100644 --- a/man/Rcpp-deprecated.Rd +++ b/man/Rcpp-deprecated.Rd @@ -6,6 +6,15 @@ \pkg{Rcpp} package only, and may be removed in future versions. } \details{ - \code{loadRcppModules} calls should now be replaced by + \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). + } } +\author{Dirk Eddelbuettel and Romain Francois} +\keyword{programming} +\keyword{interface} diff --git a/man/RcppLdFlags.Rd b/man/RcppLdFlags.Rd index ab17d796c..3abc642a0 100644 --- a/man/RcppLdFlags.Rd +++ b/man/RcppLdFlags.Rd @@ -1,16 +1,18 @@ -\name{LdFlags} +\name{LdFlags-deprecated} \alias{LdFlags} \alias{RcppLdFlags} -\title{(Deprecated) Rcpp Linker Flags} +\title{Deprecated Rcpp Linker Flags} \description{ - In previous versions of Rcpp, \code{LdFlags} and \code{RcppLdFlags} - were used to return the required flags and options for the system linker to - link to the Rcpp user library. Since we no longer build or ship a - user library, these functions now return an empty string. + In Rcpp versions prior to release 0.10.1 of November 2013, + \code{LdFlags} and \code{RcppLdFlags} were used to return the required + flags and options for the system linker to link to the Rcpp user + library. Since we no longer build or ship a user library, these + functions now return an empty string. As of Rcpp release 0.12.19, + these functions are now deprecated. } \usage{ -LdFlags() -RcppLdFlags() + LdFlags() + RcppLdFlags() } \value{ An empty string. From 7a0e41d73000f47f891b87d58536a112ef8efe3a Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Sat, 28 Jul 2018 08:16:20 -0500 Subject: [PATCH 2/2] untabify NAMESPACE --- NAMESPACE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 07694e7e4..3e7ab64e0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -26,8 +26,8 @@ export(Module, sourceCpp, compileAttributes, registerPlugin, - RcppLdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 - LdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 + RcppLdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 + LdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018 demangle, sizeof, cpp_object_initializer,