You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* checking tests ... OK
Running ‘autoprint.R’
Comparing ‘autoprint.Rout’ to ‘autoprint.Rout.save’ ...17,20d16
< a
< <int>
< 1: 1
< 2: 3
27,30d22
< a
< <int>
< 1: 1
< 2: 3
32,36d23
< Index: <a>
< a
< <int>
< 1: 1
< 2: 3
38,42d24
< Index: <a>
< a
< <int>
< 1: 1
< 2: 3
60,63d41
< a
< <int>
< 1: 1
< 2: 5
65,68d42
< a
< <int>
< 1: 1
< 2: 6
72,75d45
< a
< <int>
< 1: 1
< 2: 5
142,144d111
< a
< <int>
< 1: 9
150,153d116
< a
< <int>
< 1: 10
< 2: 10
155,158d117
< a
< <int>
< 1: 10
< 2: 10
160,163d118
< a
< <int>
< 1: 10
< 2: 10
209,214d163
< x y
< <num> <num>
< 1: 1 1
< Warning message:
< In `[.data.table`(dt, , `:=`(y, 1)) :
< A shallow copy of this data.table was taken so that := can add or remove 1 columns by reference. At an earlier point, this data.table was copied by R (or was created manually using structure() or similar). Avoid names<- and attr<- which in R currently (and oddly) may copy the whole data.table. Use set* syntax instead to avoid copying: ?set, ?setnames and ?setattr. It's also not unusual for data.table-agnostic packages to produce tables affected by this issue. If this message doesn't help, please report your use case to the data.table issue tracker so the root cause can be fixed or this message improved.
That was a good guess. We fixed the warning. Printing, when it shouldn't, is still an issue, but till nobody reports that, I think it is fine to close. This really affects very few users (R 3.4.0 is very old) and it is only a printing behavior that is different.
Sooner or later we will move stated dependency to R 3.5.0 and then it will not be relevant at all.
Both 3.4.0 and 3.5.0 warn about non-suppressed auto-printing and (with sufficiently old knitr installed) fail to rebuild vignette output due to a |> pipe in datatable-intro.Rmd.
3.4.0 additionally fails datatable-benchmarking.Rmd due to missing isFALSE and the new tests from #5401 due to missing ALTREP. Which one of these need fixing?
3.4.0 additionally fails datatable-benchmarking.Rmd due to missing isFALSE and the new tests from #5401 due to missing ALTREP. Which one of these need fixing?
Hm that's strange, could you share the exact errors & repro environments?
Sorry for being insufficiently precise regarding ALTREP: the tests were
failing due to the .Inspect() output differing from their expectations,
which has been fixed by #7125.
The remaining vignette problem is due to 'markdown' having an
undeclared dependency on R ≥ 3.5:
tools::buildVignette('00_pkg_src/data.table/vignettes/datatable-benchmarking.Rmd')
# Error in isFALSE(options[["standalone"]]) :
# could not find function "isFALSE"
traceback()
# 5: mark(..., format = "html", template = template)
# 4: markdown::mark_html(out, output, ...)
# 3: (if (grepl("\\.[Rr]md$", file)) knit2html else if
# (grepl("\\.[Rr]rst$", file)) knit2pandoc else knit)(file, encoding =
# encoding, quiet = quiet, envir = globalenv(), ...)
# 2: engine$weave(file, quiet = quiet, encoding = encoding, ...)
# 1: tools::buildVignette("00_pkg_src/data.table/vignettes/datatable-benchmarking.Rmd")
There probably exists a consistent set of package versions that really
does work on R-3.4, but it's not trivial to find. Older 'markdown'
needs older 'xfun' (for isFALSE), which requires downgrading 'knitr'
further, and so on.
That's what we already do on GitLab CI. I'm sorry for the false alarm. I thought I found a relatively easy way to install compatible older package versions from the CRAN archive and missed the fact that the isFALSE failure was from markdown, not data.table.
Unfortunately, the NOTE is present in the ancient check output. The reason is due to how R-3.4 and R-3.5 auto-printed values: the thing on the call stack is not a call to base::print, but a promise object that evaluates to it:
In theory, the fix is to add another condition: if R version is within range (TODO: find out when it changed) and there's a promise on the call stack, and eval(promise) is base::print, then we're being auto-printed. Since it's the upstream call, evaluating the promise should return its cached value, not run any more code.
Hi there! I am part of the group working on this issue, but we are having some problems getting to the actual root of the problem. Would it be appropriate for this to simply suppress the calls, or is there anything you might recommend?
Yes, the idea is to suppress the calls so that tests/autoprint.R produces the same output as in the "golden" file tests/autoprint.Rout on all supported versions of R (3.5-4.7). The root of the problem is that our current kludge doesn't work on R-3.4 and R-3.5 (and maybe other versions as well) due to differences in what print.data.tableobserves on the call stack.
Activity
MichaelChirico commentedon Jun 26, 2025
First guess is it's due to #6631. Unfortunately codespaces is not cooperating so I won't be able to install 3.4 to debug further.
I guess here:
class<-has created the shallow copy -- isn't this warning expected in that case? Possibly we should just ignore this issue as WAI.jangorecki commentedon Jun 27, 2025
That was a good guess. We fixed the warning. Printing, when it shouldn't, is still an issue, but till nobody reports that, I think it is fine to close. This really affects very few users (R 3.4.0 is very old) and it is only a printing behavior that is different.
Sooner or later we will move stated dependency to R 3.5.0 and then it will not be relevant at all.
MichaelChirico commentedon Jun 27, 2025
Maybe confirm it's not present on 3.5.0 first? (offhand I don't recall we have ongoing CI for that)
(edir: just saw your comment to similar effect on the PR)
aitap commentedon Jul 1, 2025
Both 3.4.0 and 3.5.0 warn about non-suppressed auto-printing and (with sufficiently old
knitrinstalled) fail to rebuild vignette output due to a|>pipe indatatable-intro.Rmd.3.4.0additionally failsdatatable-benchmarking.Rmddue to missingisFALSEand the new tests from #5401 due to missing ALTREP. Which one of these need fixing?MichaelChirico commentedon Jul 3, 2025
Hm that's strange, could you share the exact errors & repro environments?
We define
isFALSEhere:data.table/R/utils.R
Lines 9 to 12 in 4773ef9
Here's the 3.5.0 tag which includes
isFALSE:https://github.com/wch/r-source/blob/88de3c2999d72e257670deb5216acf3a426586b9/src/library/base/R/identical.R#L34
And we define a placeholder
ALTREPmacro here:data.table/src/data.table.h
Lines 5 to 6 in 4773ef9
At the time,
ALTREPwas defined in Rinternals.h, though it's since moved to Defn.h (as of 4.2.0), maybe that matters?https://github.com/wch/r-source/blob/88de3c2999d72e257670deb5216acf3a426586b9/src/include/Rinternals.h#L318
https://github.com/wch/r-source/blob/775760668cadaf563fe771960c8a4cb1f5d8e75c/src/include/Defn.h#L212
aitap commentedon Jul 3, 2025
MichaelChirico commentedon Jul 3, 2025
I guess we should pin our hopes on #6584 then cc @ben-schwen
jangorecki commentedon Jul 4, 2025
On 3.4 we should then skip building and testing vignettes
aitap commentedon Jul 4, 2025
That's what we already do on GitLab CI. I'm sorry for the false alarm. I thought I found a relatively easy way to install compatible older package versions from the CRAN archive and missed the fact that the
isFALSEfailure was frommarkdown, notdata.table.MichaelChirico commentedon Mar 3, 2026
Just chiming in to the original issue -- indeed we still get the minor output difference in 3.5.0.
ben-schwen commentedon Mar 12, 2026
No warning on 3.5 anymore so I'm closing here
aitap commentedon Mar 12, 2026
Unfortunately, the NOTE is present in the ancient check output. The reason is due to how R-3.4 and R-3.5 auto-printed values: the thing on the call stack is not a call to
base::print, but a promise object that evaluates to it:whereas in modern R it's
In theory, the fix is to add another condition: if R version is within range (TODO: find out when it changed) and there's a promise on the call stack, and
eval(promise)isbase::print, then we're being auto-printed. Since it's the upstream call, evaluating the promise should return its cached value, not run any more code.gitstopher commentedon Mar 25, 2026
Is this issue still open? Me and my group would like to try and contribute to the project and fix the issue.
prestonimus commentedon Apr 20, 2026
Hi there! I am part of the group working on this issue, but we are having some problems getting to the actual root of the problem. Would it be appropriate for this to simply suppress the calls, or is there anything you might recommend?
aitap commentedon Apr 21, 2026
Yes, the idea is to suppress the calls so that
tests/autoprint.Rproduces the same output as in the "golden" filetests/autoprint.Routon all supported versions of R (3.5-4.7). The root of the problem is that our current kludge doesn't work on R-3.4 and R-3.5 (and maybe other versions as well) due to differences in whatprint.data.tableobserves on the call stack.In case you're curious,
...the difference is due to R-3.5 using
findVarto locatebase::print, which returns a promise, while modern R usesfindFun, which extracts the value of the promise before returning the function. The promise appears because when R starts up, it populates the "base namespace" usingmakeLazy.If you can account for these differences so that printing is suppressed both in old and modern versions of R, that would be very good.
Fix Trailing White Space, Add NEWS item for Rdatatable#7099
Fix print output for Rdatatable#7099