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-liberal.R > ## Don't edit - it was autogenerated by inst/testme/deploy.R > globals:::testme("liberal") Test 'liberal' ... 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-liberal.R' > library(globals) > suppressWarnings({ + rm(list = c("a", "b", "c", "x", "y", "z", "square", "pathname", + "url", "filename")) + }) > message("Setting up expressions") Setting up expressions > exprs <- list(A = quote({ + Sys.sleep(1) + x <- 0.1 + }), B = quote({ + y <- 0.2 + }), C = quote({ + z <- a + 0.3 + }), D = quote({ .... [TRUNCATED] > atleast <- list(A = c(), B = c(), C = c("a"), D = c("filename"), + E = c("c"), F = c(), G = c("a", "square"), H = c()) > not <- list(A = c("x"), B = c("y"), C = c("z"), D = c("pathname"), + E = c("b"), F = c(), G = c(), H = c()) > a <- 3.14 > c <- 2.71 > square <- function(x) x^2 > filename <- "index.html" > message("Find globals") Find globals > for (kk in seq_along(exprs)) { + key <- names(exprs)[kk] + expr <- exprs[[key]] + cat(sprintf("Expression #%d ('%s'):\n", kk, key)) + .... [TRUNCATED] Expression #1 ('A'): { Sys.sleep(1) x <- 0.1 } Globals: '{', 'Sys.sleep', '<-' Globals: '{', 'Sys.sleep', '<-' List of 3 $ { :.Primitive("{") $ Sys.sleep:function (time) $ <- :.Primitive("<-") - attr(*, "where")=List of 3 ..$ { : ..$ Sys.sleep: ..$ <- : - attr(*, "class")= chr [1:2] "Globals" "list" Expression #2 ('B'): { y <- 0.2 } Globals: '{', '<-' Globals: '{', '<-' List of 2 $ { :.Primitive("{") $ <-:.Primitive("<-") - attr(*, "where")=List of 2 ..$ { : ..$ <-: - attr(*, "class")= chr [1:2] "Globals" "list" Expression #3 ('C'): { z <- a + 0.3 } Globals: '{', '<-', '+', 'a' Globals: '{', '<-', '+', 'a' List of 4 $ { :.Primitive("{") $ <-:.Primitive("<-") $ + :function (e1, e2) $ a : num 3.14 - attr(*, "where")=List of 4 ..$ { : ..$ <-: ..$ + : ..$ a : - attr(*, "class")= chr [1:2] "Globals" "list" Expression #4 ('D'): { pathname <- file.path(dirname(url), filename) } Globals: '{', '<-', 'file.path', 'dirname', 'url', 'filename' Globals: '{', '<-', 'file.path', 'dirname', 'url', 'filename' List of 6 $ { :.Primitive("{") $ <- :.Primitive("<-") $ file.path:function (..., fsep = .Platform$file.sep) $ dirname :function (path) $ url :function (description, open = "", blocking = TRUE, encoding = getOption("encoding"), method = getOption("url.method", "default"), headers = NULL) $ filename : chr "index.html" - attr(*, "where")=List of 6 ..$ { : ..$ <- : ..$ file.path: ..$ dirname : ..$ url : ..$ filename : - attr(*, "class")= chr [1:2] "Globals" "list" Expression #5 ('E'): { b <- c } Globals: '{', '<-', 'c' Globals: '{', '<-', 'c' List of 3 $ { :.Primitive("{") $ <-:.Primitive("<-") $ c : num 2.71 - attr(*, "where")=List of 3 ..$ { : ..$ <-: ..$ c : - attr(*, "class")= chr [1:2] "Globals" "list" Expression #6 ('F'): { a <- { runif(1) } b <- { rnorm(1) } x <- a * b abs(x) } Globals: '{', '<-', 'runif', 'rnorm', '*', 'a', 'b', 'abs', 'x' Globals: '{', '<-', 'runif', 'rnorm', '*', 'a', 'b', 'abs', 'x' List of 9 $ { :.Primitive("{") $ <- :.Primitive("<-") $ runif:function (n, min = 0, max = 1) $ rnorm:function (n, mean = 0, sd = 1) $ * :function (e1, e2) $ a : num 3.14 $ b : NULL $ abs :function (x) $ x : NULL - attr(*, "where")=List of 9 ..$ { : ..$ <- : ..$ runif: .. ..- attr(*, "name")= chr "package:stats" .. ..- attr(*, "path")= chr "D:/RCompile/recent/R/library/stats" ..$ rnorm: .. ..- attr(*, "name")= chr "package:stats" .. ..- attr(*, "path")= chr "D:/RCompile/recent/R/library/stats" ..$ * : ..$ a : ..$ b : NULL ..$ abs : ..$ x : NULL - attr(*, "class")= chr [1:2] "Globals" "list" Expression #7 ('G'): { y <- square(a) } Globals: '{', '<-', 'square', 'a' Globals: '{', '<-', 'square', 'a', '^' List of 5 $ { :.Primitive("{") $ <- :.Primitive("<-") $ square:function (x) $ a : num 3.14 $ ^ :function (e1, e2) - attr(*, "where")=List of 5 ..$ { : ..$ <- : ..$ square: ..$ a : ..$ ^ : - attr(*, "class")= chr [1:2] "Globals" "list" Expression #8 ('H'): { b <- a a <- 1 } Globals: '{', '<-', 'a' Globals: '{', '<-', 'a' List of 3 $ { :.Primitive("{") $ <-:.Primitive("<-") $ a : num 3.14 - attr(*, "where")=List of 3 ..$ { : ..$ <-: ..$ a : - attr(*, "class")= chr [1:2] "Globals" "list" > names <- findGlobals(exprs, method = "liberal", unlist = TRUE) > cat(sprintf("Globals: %s\n", paste(sQuote(names), + collapse = ", "))) Globals: '{', 'Sys.sleep', '<-', '+', 'a', 'file.path', 'dirname', 'url', 'filename', 'c', 'runif', 'rnorm', '*', 'b', 'abs', 'x', 'square' 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.2s, sys.self=0s, elapsed=0.2s, user.child=NAs, sys.child=NAs Test 'liberal' ... success > > proc.time() user system elapsed 0.42 0.07 0.48