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
I'm not reproducing it locally, and we don't see it on GHA nor on GitLab CI logs. Makes it a lot tougher to debug.
@TysonStanley, can you confirm your R, knitr and data.table versions where you're seeing the issue? And maybe try doing trace(data.table:::shouldPrint, at=3, quote(message("ret=", ret))) and check the output of the knitr test again?
It looks like it's caused by an upgrade of something in the knitr stack. Reinstalling recursive dependencies of data.table made it possible to reproduce locally for me.
print.data.table performs additional tests on sys.calls() if shouldPrint returns FALSE:
Here, length(SYS) is very much > 3, but the symbol at length(SYS)-2 is not source, nor the one at length(SYS)-3 is %chin% data.table:::mimicsAutoPrint (which is knit_print.default).
Previously, the stack looked differently and, indeed, knit_print.default was present at position length(SYS)-3:
Activity
MichaelChirico commentedon Sep 28, 2024
Copying @TysonStanley 's comment here:
Looks like the difference is that
DT[, z := 7:9]is printing in theknitroutput.MichaelChirico commentedon Sep 28, 2024
Copying Tyson's next comment here too:
Not sure why it's not showing up in CI checks at all. It's a note on Linux and windows on CRAN and it showed up on MacOS for me here.
MichaelChirico commentedon Sep 28, 2024
I'm not reproducing it locally, and we don't see it on GHA nor on GitLab CI logs. Makes it a lot tougher to debug.
@TysonStanley, can you confirm your R, knitr and data.table versions where you're seeing the issue? And maybe try doing
trace(data.table:::shouldPrint, at=3, quote(message("ret=", ret)))and check the output of the knitr test again?TysonStanley commentedon Sep 29, 2024
Only happens when I'm accessing R directly in the terminal but this is what happened when I inserted that code into the .Rmd before knitting:
The
DT[, z := 10:12]definitely triggersshouldPrint(x). Is there more information I can extract? Should I setverbose = TRUEfor these as well?MichaelChirico commentedon Oct 7, 2024
@TysonStanley ah, it looks like the
ret=part is not printing to the right place. What about usingcat(sprintf("ret=%s\n", ret))instead ofmessage()?TysonStanley commentedon Oct 7, 2024
aitap commentedon Oct 8, 2024
It looks like it's caused by an upgrade of something in the
knitrstack. Reinstalling recursive dependencies ofdata.tablemade it possible to reproduce locally for me.print.data.tableperforms additional tests onsys.calls()ifshouldPrintreturns FALSE:data.table/R/print.data.table.R
Lines 24 to 41 in bb9faf6
Adding
...yields:
Here,
length(SYS)is very much> 3, but the symbol atlength(SYS)-2is notsource, nor the one atlength(SYS)-3is%chin% data.table:::mimicsAutoPrint(which isknit_print.default).Previously, the stack looked differently and, indeed,
knit_print.defaultwas present at positionlength(SYS)-3:Time to add more
knitrworkarounds?tdhock commentedon Oct 9, 2024
fixed by #6563
(textproc/R-data.table) Updated 1.16.4 to 1.18.4, Fix build against 4…
(textproc/R-data.table) Updated 1.16.4 to 1.18.4, Fix build against 4…