Open DorisAmoakohene opened 10 months ago
it looks like one of the arguments that should be a version, evaluates to 4. Can you please show me the prompt, command, and output from the R terminal? (you did not show me the prompt and command prior to the error, so it is difficult for me to understand what code gives that error.
> command()
output
An easy way to do this is using https://reprex.tidyverse.org/ which I have told you about many times, so can you please do that?
it looks like your issue may be that setDTthreads(2L) is being provided as an argument to atime_versions, so that may be interpreted as a version?
I get an error message with most recent version of atime,
> atime.list <- atime::atime_versions(
+ pkg.path="~/R/data.table",
+ pkg.edit.fun=function(old.Package, new.Package, sha, new.pkg.path){
+ pkg_find_replace <- function(glob, FIND, REPLACE){
+ atime::glob_find_replace(file.path(new.pkg.path, glob), FIND, REPLACE)
+ }
+ Package_regex <- gsub(".", "_?", old.Package, fixed=TRUE)
+ Package_ <- gsub(".", "_", old.Package, fixed=TRUE)
+ new.Package_ <- paste0(Package_, "_", sha)
+ pkg_find_replace(
+ "DESCRIPTION",
+ paste0("Package:\\s+", old.Package),
+ paste("Package:", new.Package))
+ pkg_find_replace(
+ file.path("src","Makevars.*in"),
+ Package_regex,
+ new.Package_)
+ pkg_find_replace(
+ file.path("R", "onLoad.R"),
+ Package_regex,
+ new.Package_)
+ pkg_find_replace(
+ file.path("R", "onLoad.R"),
+ sprintf('packageVersion\\("%s"\\)', old.Package),
+ sprintf('packageVersion\\("%s"\\)', new.Package))
+ pkg_find_replace(
+ file.path("src", "init.c"),
+ paste0("R_init_", Package_regex),
+ paste0("R_init_", gsub("[.]", "_", new.Package_)))
+ pkg_find_replace(
+ "NAMESPACE",
+ sprintf('useDynLib\\("?%s"?', Package_regex),
+ paste0('useDynLib(', new.Package_))
+ },
+ N=10^seq(3,8),
+ setDTthreads(2L),
+ setup={
+ set.seed(108)
+ n2 = 1:N
+ n1 = sample(n2, N)
+ d1=data.table(id1=paste0("id",sample(n1)), id2=paste0("id",sample(n1)), v1=n1)
+ d2=data.table(id1=paste0("id",sample(n2)), id2=paste0("id",sample(n2)), v2=n2)
+ },
+ expr=data.table:::`[.data.table`(d2(d1, v1 := i.v1, on=c("id1","id2"))),
+ "Before"="8b201fd28f5d4afcc4be026a5d9eb4bb6dd62955",#https://github.com/Rdatatable/data.table/commit/8b201fd28f5d4afcc4be026a5d9eb4bb6dd62955
+ "Regression"="e0140eafa07ad39a7ac9d67737cc43c4c95ca935")
Erreur dans get_sha_vec(sha.vec, dots.vec) :
each ... argument and sha.vec element must be named
> packageVersion("atime")
[1] ‘2023.11.11’
ret
"``` r"
atime.list <- atime::atime_versions("
pkg.path=tdir,"
"pkg.edit.fun=function(old.Package, new.Package, sha, new.pkg.path){"
pkg_find_replace <- function(glob, FIND, REPLACE){"
atime::glob_find_replace(file.path(new.pkg.path, glob), FIND, REPLACE)"
" }"
" Package_regex <- gsub(\".\", \"_?\", old.Package, fixed=TRUE)"
" Package_ <- gsub(\".\", \"_\", old.Package, fixed=TRUE)"
new.Package_ <- paste0(Package_, \"_\", sha)"
pkg_find_replace("
\"DESCRIPTION\", "
paste0(\"Package:\\\\s+\", old.Package),"
paste(\"Package:\", new.Package))"
pkg_find_replace("
file.path(\"src\",\"Makevars.*in\"),"
Package_regex,"
new.Package_)"
pkg_find_replace("
file.path(\"R\", \"onLoad.R\"),"
Package_regex,"
new.Package_)"
pkg_find_replace("
file.path(\"R\", \"onLoad.R\"),"
sprintf('packageVersion\\\\(\"%s\"\\\\)', old.Package),"
sprintf('packageVersion\\\\(\"%s\"\\\\)', new.Package))"
pkg_find_replace("
file.path(\"src\", \"init.c\"),"
paste0(\"R_init_\", Package_regex),"
paste0(\"R_init_\", gsub(\"[.]\", \"_\", new.Package_)))"
pkg_find_replace("
\"NAMESPACE\","
sprintf('useDynLib\\\\(\"?%s\"?', Package_regex),"
paste0('useDynLib(', new.Package_))"
},"
N=10^seq(3,8),"
"setDTthreads(2L),"
setup={ "
set.seed(108)"
n2 = 1:N"
n1 = sample(n2, N)"
d1=data.table(id1=paste0(\"id\",sample(n1)), id2=paste0(\"id\",sample(n1)), v1=n1)"
d2=data.table(id1=paste0(\"id\",sample(n2)), id2=paste0(\"id\",sample(n2)), v2=n2)"
" },"
expr=data.table:::`[.data.table`(d2(d1, v1 := i.v1, on=c(\"id1\",\"id2\"))),"
\"Before\"=\"8b201fd28f5d4afcc4be026a5d9eb4bb6dd62955\",#https://github.com/Rdatatable/data.table/commit/8b201fd28f5d4afcc4be026a5d9eb4bb6dd62955"
\"Regression\"=\"e0140eafa07ad39a7ac9d67737cc43c4c95ca935\")"
#> Error in eval(expr, envir, enclos): object 'tdir' not found"
"```"
""
<sup>Created on 2023-11-17 with [reprex v2.0.2.9000](https://reprex.tidyverse.org)</sup>"
hi, can you please make sure the code and output are formatted correctly? it looks like your code is incomplete (tdir not found) but it is difficult to read because you did not format it correctly.
plot(1:10, xlab = stop("problem"))
#> Error in plot.default(1:10, xlab = stop("problem")): problem
Created on 2023-11-21 with reprex v2.0.2
plot(1:10, xlab = stop("another problem"))
#> Error in plot.default(1:10, xlab = stop("another problem")): another problem
Created on 2023-11-21 with reprex v2.0.2
@tdhock
Kindly assist me in debugging this error. These are the link issues I am trying to reproduce
https://github.com/Rdatatable/data.table/issues/3928
https://github.com/Rdatatable/data.table/issues/3928#issuecomment-651408089
my atime code
the setup code
Traceback