Skip to content

Commit 6d8ee8c

Browse files
committed
remove testing placemark messages
1 parent dd621a2 commit 6d8ee8c

2 files changed

Lines changed: 12 additions & 25 deletions

File tree

nCompiler/R/nCompile.R

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ nCompile <- function(...,
258258
package = FALSE,
259259
returnList = FALSE) { ## return a list even if there is only one unit being compiled.
260260
#(1) Put together inputs from ...
261-
cat("starting nCompile\n")
261+
# cat("starting nCompile\n")
262262

263263
dotsDeparses <- unlist(lapply( substitute(list(...))[-1], deparse ))
264264
origList <- list(...)
@@ -354,7 +354,7 @@ nCompile <- function(...,
354354
# after packing up control list (e.g. from interfaces)
355355

356356
# (2) Create cppDefs
357-
cat("making cppDefs\n")
357+
# cat("making cppDefs\n")
358358
cppDefs_info <- createCppDefsInfo(units, unitTypes, control, compileInfos)
359359
cppDefs <- cppDefs_info$cppDefs
360360
if(isTRUE(control$return_cppDefs)) return(cppDefs)
@@ -382,7 +382,7 @@ nCompile <- function(...,
382382

383383
if(!is.null(from_writePackage)) {
384384
# .writePackage content was provided, so we were called from writePackage
385-
cat("doing return(writePackage(...))\n")
385+
# cat("doing return(writePackage(...))\n")
386386
return(
387387
writePackage(pkgName = from_writePackage$pkgName,
388388
dir = dir,
@@ -398,7 +398,7 @@ nCompile <- function(...,
398398

399399
# From here on, we were not called from writePackage
400400
if(package) {
401-
cat("calling writePackage for package mode\n")
401+
# cat("calling writePackage for package mode\n")
402402
# user requests nCompile use packaging mechanism
403403
temppkgname <- basename(tempfile("TEMPPKG", ""))
404404
writePackage(pkgName = temppkgname,
@@ -412,7 +412,7 @@ nCompile <- function(...,
412412
lib <- file.path(tempdir(), "templib")
413413
if(!dir.exists(lib)) dir.create(lib, recursive=TRUE)
414414
pkgDir <- file.path(dir, temppkgname)
415-
cat("about to try devtools::install\n")
415+
# cat("about to try devtools::install\n")
416416
ans <- try({
417417
withr::with_libpaths(lib, {
418418
devtools::install(pkgDir,
@@ -430,7 +430,7 @@ nCompile <- function(...,
430430
names(ans_) <- returnNames
431431
ans_
432432
})
433-
cat("done trying devtools::install\n")
433+
# cat("done trying devtools::install\n")
434434
if(inherits(ans, "try-error")) {
435435
stop("It looks like the package code was generated without stopping,\n",
436436
"but there was an error installing or loading it.\n",
@@ -443,7 +443,7 @@ nCompile <- function(...,
443443
} else {
444444
# We will not use packaging mechanism
445445
RcppPacket_list <- cppDefsList_2_RcppPacketList(cppDefs)
446-
cat("doing nCompile_finish_nonpackage\n")
446+
# cat("doing nCompile_finish_nonpackage\n")
447447
return(
448448
nCompile_finish_nonpackage(units = units,
449449
cppDefs = cppDefs,
@@ -471,7 +471,7 @@ writePackage <- function(...,
471471
modify = get_nOption("modifyPackageFiles"),
472472
memberData = list(),
473473
roxygen = list()) {
474-
cat("starting writePackage\n")
474+
# cat("starting writePackage\n")
475475
require(Rcpp)
476476
pkgDir <- file.path(dir, pkgName)
477477
modify <- match.arg(modify, c("no", "add", "clear"))
@@ -494,7 +494,7 @@ writePackage <- function(...,
494494
if(is.null(content)) { # this means we are being called directly, not from nCompile
495495
# We call nCompile with control$.writePackage containing arguments needed for
496496
# nCompile to recurse back to writePackage with control$prepared_content filled in.
497-
cat("calling nCompile\n")
497+
# cat("calling nCompile\n")
498498
res <- nCompile(...,
499499
dir = dir,
500500
env = parent.frame(), # will not be used
@@ -545,7 +545,7 @@ writePackage <- function(...,
545545
codeDir <- file.path(instDir, "include", "nCompGeneratedCode")
546546
datDir <- file.path(pkgDir, "data")
547547
#
548-
cat("starting writePackage writing steps\n")
548+
# cat("starting writePackage writing steps\n")
549549
WP_check_unit_types(units, unitTypes)
550550
cppDefs <- WP_add_roxygen_fxns_to_cppDefs(cppDefs, units, unitTypes, roxygen, roxygenFlag)
551551
full_interfaces <- WP_build_full_interfaces(units, unitTypes, interfaces, exportNames)
@@ -573,11 +573,11 @@ writePackage <- function(...,
573573
## # message("Deleting ", compiledObjs)
574574
## unlink(compiledObjs)
575575
## }
576-
cat("calling compileAttributs\n")
576+
# cat("calling compileAttributs\n")
577577
compileAttributes(pkgdir = pkgDir)
578578
update_compileAttributes_for_argPassing(Rdir,
579579
units, unitTypes, returnNames)
580-
cat("finished writePackage\n")
580+
# cat("finished writePackage\n")
581581
invisible(NULL)
582582
}
583583

nCompiler/tests/testthat/nCompile_tests/test-argumentPassing.R

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ test_that("pass 1D by copy works (compiled & uncompiled)", {
6060
####################
6161
## 1D tests
6262

63-
cat("starting 1D tests\n")
64-
6563
# compiled and uncompiled 1D by ref
6664
test_that("pass 1D by ref and blockRef works and error-traps (compiled & uncompiled) in nFunction", {
6765
message("This test has many trapped errors.")
68-
cat("A\n")
6966
foo <- nFunction(
7067
function(x = numericVector(), xRef = numericVector(), xBlockRef = numericVector()) {
7168
xRef <- x[1:2] + 10
@@ -77,7 +74,6 @@ test_that("pass 1D by ref and blockRef works and error-traps (compiled & uncompi
7774
blockRefArgs = 'xBlockRef',
7875
returnType = 'numericVector'
7976
)
80-
cat("B\n")
8177
test_foo <- function(fn) {
8278
x <- as.numeric(1:3)
8379
xRef <- as.numeric(11:13)
@@ -90,9 +86,7 @@ test_that("pass 1D by ref and blockRef works and error-traps (compiled & uncompi
9086
expect_equal(xRef, x[1:2] + 10)
9187
expect_equal(xBlockRef, c(21, 1:2 + 10 + 1000))
9288
}
93-
cat("C\n")
9489
cfoo <- nCompile(foo)
95-
cat("D\n")
9690
test_foo(foo)
9791
test_foo(cfoo)
9892
test_foo(cfoo) # Do twice to invoke byte-compiled version.
@@ -103,27 +97,20 @@ test_that("pass 1D by ref and blockRef works and error-traps (compiled & uncompi
10397
# and our then our tricky code failed. So we stopped being tricky in C++
10498
# and took another approach. However we still have
10599
# second-calls as regression tests on this problem.
106-
cat("E\n")
107100
cfoo <- nCompile(foo, package=TRUE)
108-
cat("F\n")
109101
test_foo(cfoo)
110102
test_foo(cfoo)
111103
dir <- file.path(tempdir(), "test_nComp_testpackage_argPassing")
112104
test <- writePackage(foo, pkgName = "testpackage", dir = dir, modify="clear")
113105
lib <- file.path(tempdir(), "test_nComp_lib_argPassing")
114-
cat("G\n")
115106
dir.create(lib, showWarnings=FALSE)
116107
withr::with_libpaths(lib, devtools::install(file.path(dir, "testpackage"),
117108
upgrade = "never", quick=TRUE, quiet=TRUE))
118-
cat("H\n")
119109
withr::with_libpaths(lib, load_dynamic_namespace("testpackage"))
120-
cat("I\n")
121110
test_foo(access_dynamic_package("testpackage", "foo"))
122111
test_foo(access_dynamic_package("testpackage", "foo"))
123112
})
124113

125-
cat("starting 1D ref and blockRef tests\n")
126-
127114

128115
test_that("pass 1D by ref and blockRef works and error-traps via nClass method (compiled & uncompiled)", {
129116
message("This test has four trapped errors.")

0 commit comments

Comments
 (0)