R Under development (unstable) (2025-04-15 r88147 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## This runs testme test script inst/testme/test-dotdotdot.R > ## Don't edit - it was autogenerated by inst/testme/deploy.R > globals:::testme("dotdotdot") Test 'dotdotdot' ... Sourcing 9 prologue scripts ... 01/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/001.load.R' 02/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/005.globals.R' 03/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/010.record-state.R' 04/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/030.imports.R' 05/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/050.utils.R' 06/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/090.context.R' 07/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/090.options.R' 08/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/091.envvars.R' 09/09 prologue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_prologue/995.detrius-connections.R' Sourcing 9 prologue scripts ... done Running test script: 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/test-dotdotdot.R' > library(globals) > options(warn = 2) > exprs <- list(ok1 = quote(function(...) sum(x, ...)), + ok2 = quote(function(...) sum(x, ..1, ..2, ..3)), warn1 = quote(sum(x, + ...)) .... [TRUNCATED] > truth <- list(ok1 = c("sum", "x"), ok2 = c("sum", + "x"), warn1 = c("sum", "x", "..."), warn2 = c("sum", "x", + "..1", "..2", "..3")) > message("*** findGlobals() ...") *** findGlobals() ... > for (name in names(exprs)) { + expr <- exprs[[name]] + message(sprintf("\n*** codetools::findGlobals() - step %s:", + sQuote(name)) .... [TRUNCATED] *** codetools::findGlobals() - step 'ok1': function(...) sum(x, ...) function () function(...) sum(x, ...) [1] "sum" "x" *** codetools::findGlobals() - step 'ok2': function(...) sum(x, ..1, ..2, ..3) function () function(...) sum(x, ..1, ..2, ..3) [1] "sum" "x" *** codetools::findGlobals() - step 'warn1': sum(x, ...) function () sum(x, ...) [1] "sum" "x" *** codetools::findGlobals() - step 'warn2': sum(x, ..1, ..2, ..3) function () sum(x, ..1, ..2, ..3) [1] "sum" "x" > message("\n*** findGlobals(, dotdotdot = 'return'):") *** findGlobals(, dotdotdot = 'return'): > print(exprs) $ok1 function(...) sum(x, ...) $ok2 function(...) sum(x, ..1, ..2, ..3) $warn1 sum(x, ...) $warn2 sum(x, ..1, ..2, ..3) > globals <- findGlobals(exprs, dotdotdot = "return") > print(globals) [1] "sum" "x" "..." "..1" "..2" "..3" > assert_identical_sets(globals, unique(unlist(truth, + use.names = FALSE))) > message("\n*** findGlobals(, dotdotdot = 'return'):") *** findGlobals(, dotdotdot = 'return'): > formula_attr <- bquote(~.(call("fn", quote(...)))) > x <- structure(integer(), formula_attr = formula_attr) > print(x) integer(0) attr(,"formula_attr") ~fn(...) > globals <- findGlobals(x, dotdotdot = "return", attributes = TRUE) > print(globals) [1] "~" "fn" > assert_identical_sets(globals, c("~", "fn")) > message("*** findGlobals() ... DONE") *** findGlobals() ... DONE > message("*** globalsOf() ...") *** globalsOf() ... > x <- 1:2 > for (name in names(exprs)) { + expr <- exprs[[name]] + message("\n*** globalsOf(dotdotdot = 'ignore'):") + cat(sprintf("Expression '%s': ..." ... [TRUNCATED] *** globalsOf(dotdotdot = 'ignore'): Expression 'ok1': function(...) sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'ok1': function(...) sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'ok1': function(...) sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'ok1': function(...) sum(x, ...) *** globalsOf(dotdotdot = 'ignore'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) *** globalsOf(dotdotdot = 'ignore'): Expression 'warn1': sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'warn1': sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 $... [1] NA attr(,"class") [1] "DotDotDotList" "logical" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$... NULL attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'warn1': sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 $... [1] NA attr(,"class") [1] "DotDotDotList" "logical" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$... NULL attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'warn1': sum(x, ...) *** globalsOf(dotdotdot = 'ignore'): Expression 'warn2': sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'warn2': sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 $..1 [1] NA attr(,"class") [1] "DotDotDotList" "logical" $..2 [1] NA attr(,"class") [1] "DotDotDotList" "logical" $..3 [1] NA attr(,"class") [1] "DotDotDotList" "logical" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$..1 NULL attr(,"where")$..2 NULL attr(,"where")$..3 NULL attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'warn2': sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 $..1 [1] NA attr(,"class") [1] "DotDotDotList" "logical" $..2 [1] NA attr(,"class") [1] "DotDotDotList" "logical" $..3 [1] NA attr(,"class") [1] "DotDotDotList" "logical" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$..1 NULL attr(,"where")$..2 NULL attr(,"where")$..3 NULL attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'warn2': sum(x, ..1, ..2, ..3) > message("\n*** globalsOf(, dotdotdot = 'return'):") *** globalsOf(, dotdotdot = 'return'): > print(exprs) $ok1 function(...) sum(x, ...) $ok2 function(...) sum(x, ..1, ..2, ..3) $warn1 sum(x, ...) $warn2 sum(x, ..1, ..2, ..3) > globals <- globalsOf(exprs, dotdotdot = "return") > print(globals) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 1 2 $... [1] NA attr(,"class") [1] "DotDotDotList" "logical" $..1 [1] NA attr(,"class") [1] "DotDotDotList" "logical" $..2 [1] NA attr(,"class") [1] "DotDotDotList" "logical" $..3 [1] NA attr(,"class") [1] "DotDotDotList" "logical" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$... NULL attr(,"where")$..1 NULL attr(,"where")$..2 NULL attr(,"where")$..3 NULL attr(,"class") [1] "Globals" "list" > message("*** globalsOf() ... DONE") *** globalsOf() ... DONE > message("*** function(x, ...) globalsOf() ...") *** function(x, ...) globalsOf() ... > aux <- function(x, ..., exprs) { + args <- list(...) + for (name in names(exprs)) { + expr <- exprs[[name]] + message("\n*** ..." ... [TRUNCATED] > aux(x = 3:4, y = 1, z = 42, 3.14, exprs = exprs) *** globalsOf(dotdotdot = 'ignore'): Expression 'ok1': function(...) sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'ok1': function(...) sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'ok1': function(...) sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'ok1': function(...) sum(x, ...) *** globalsOf(dotdotdot = 'ignore'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'ok2': function(...) sum(x, ..1, ..2, ..3) *** globalsOf(dotdotdot = 'ignore'): Expression 'warn1': sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'warn1': sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 $... $y [1] 1 $z [1] 42 [[3]] [1] 3.14 attr(,"class") [1] "DotDotDotList" "list" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$... attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'warn1': sum(x, ...) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 $... $y [1] 1 $z [1] 42 [[3]] [1] 3.14 attr(,"class") [1] "DotDotDotList" "list" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$... attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'warn1': sum(x, ...) *** globalsOf(dotdotdot = 'ignore'): Expression 'warn2': sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'return'): Expression 'warn2': sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 $..1 [[1]] [1] 1 attr(,"class") [1] "DotDotDotList" "list" $..2 [[1]] [1] 42 attr(,"class") [1] "DotDotDotList" "list" $..3 [[1]] [1] 3.14 attr(,"class") [1] "DotDotDotList" "list" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$..1 attr(,"where")$..2 attr(,"where")$..3 attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'warning'): Expression 'warn2': sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 $..1 [[1]] [1] 1 attr(,"class") [1] "DotDotDotList" "list" $..2 [[1]] [1] 42 attr(,"class") [1] "DotDotDotList" "list" $..3 [[1]] [1] 3.14 attr(,"class") [1] "DotDotDotList" "list" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$..1 attr(,"where")$..2 attr(,"where")$..3 attr(,"class") [1] "Globals" "list" *** globalsOf(dotdotdot = 'error'): Expression 'warn2': sum(x, ..1, ..2, ..3) *** globalsOf(, dotdotdot = 'return'): $ok1 function(...) sum(x, ...) $ok2 function(...) sum(x, ..1, ..2, ..3) $warn1 sum(x, ...) $warn2 sum(x, ..1, ..2, ..3) $sum function (..., na.rm = FALSE) .Primitive("sum") $x [1] 3 4 $... $y [1] 1 $z [1] 42 [[3]] [1] 3.14 attr(,"class") [1] "DotDotDotList" "list" $..1 [[1]] [1] 1 attr(,"class") [1] "DotDotDotList" "list" $..2 [[1]] [1] 42 attr(,"class") [1] "DotDotDotList" "list" $..3 [[1]] [1] 3.14 attr(,"class") [1] "DotDotDotList" "list" attr(,"where") attr(,"where")$sum attr(,"where")$x attr(,"where")$... attr(,"where")$..1 attr(,"where")$..2 attr(,"where")$..3 attr(,"class") [1] "Globals" "list" > message("*** function(x, ...) globalsOf() ... DONE") *** function(x, ...) globalsOf() ... DONE Sourcing 5 epilogue scripts ... 01/05 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_epilogue/002.undo-state.R' Failed to undo environment variables: - Expected environment variables: [n=207] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', ..., 'tempdirname' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: 02/05 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_epilogue/090.gc.R' 03/05 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_epilogue/099.session_info.R' 04/05 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_epilogue/995.detritus-connections.R' 05/05 epilogue script 'D:/RCompile/CRANincoming/R-devel/lib/globals/testme/_epilogue/999.detritus-files.R' Skipping, because path appears not to be an 'R CMD check' folder: 'D:/temp/2025_04_16_07_20_17_20184' Sourcing 5 epilogue scripts ... done Test time: user.self=0.3s, sys.self=0.02s, elapsed=0.3s, user.child=NAs, sys.child=NAs Test 'dotdotdot' ... success > > proc.time() user system elapsed 0.54 0.09 0.62