cli
cli copied to clipboard
Changes in R-devel break cli
Sure you will here this from elsewhere soon enough but I think the latest change in R-devel (https://github.com/wch/r-source/commit/55b259e7ea922acbd4f1f3e92309b6a699c66ff6 or maybe https://github.com/wch/r-source/commit/00c14e770b7568325e0cd7e2b5a8fbbaefd067f1) has broken cli. I'm struggling to pinpoint where as can only really get the error when documenting with roxygen or running R CMD check. One error message I'm capturing when running devtools::document (via rstudio shortcut) is:
Error in nchar(xs) :
number of characters is not computable in "bytes" encoding, element 1
Calls: suppressPackageStartupMessages ... <Anonymous> -> clii__xtext -> ansi_strwrap -> lapply -> FUN
Execution halted
Exited with status 1.
Note this is not a problem when running devtools::document(roclets = c('rd', 'collate', 'namespace'))
directly.
Apologies for the vagueness of the report. Just wanted to give you a heads up.
minimal reprex
R -s -e 'cli::cli_bullets(c(">"="bob"))'
Error in nchar(xs) :
number of characters is not computable in "bytes" encoding, element 1
Calls: <Anonymous> ... <Anonymous> -> clii__xtext -> ansi_strwrap -> lapply -> FUN
Execution halted
─ Session info ──────────────────────────────────────────────────────────
version R Under development (unstable) (2022-07-14 r82590)
os Fedora Linux 36 (Workstation Edition)
system x86_64, linux-gnu
ui X11
language (EN)
collate en_GB.UTF-8
ctype en_GB.UTF-8
tz Europe/London
date 2022-07-14
pandoc 2.14.0.3 @ /usr/bin/pandoc
─ Packages ──────────────────────────────────────────────────────────────
package * version date (UTC) lib source
cli 3.3.0.9000 2022-07-14 [1] Github (r-lib/cli@1358a1b)
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
I was probably to keen raising this (Tomas has now reverted in https://github.com/wch/r-source/commit/ef0a4a211f92640e71e87cbe7b66323f2c239e4d and all works again).
They'll probably still introduce this later, so we might as well work around it now.
I just ran into this error trying to release to CRAN. A print method uses cli which caused this error.
Will this revision be submitted to CRAN?
You mean, will an updated version of cli with a workaround be submitted to CRAN soon?
Eventually yes, but not soon. They reverted this change in R-devel, so the errors should go away by tomorrow, without us having to do anything.
It is unlikely that we could get a fix version of cli on CRAN before tomorrow, especially because probably a bunch of cli reverse dependencies are also failing their checks because of this change.
@JosiahParry The changes to Rdevel have been reverted but CRAN is likely running a day or so behind in versions. If the submission has been rejected (as opposed to placed in waiting or similar) then I would wait until after the weekend and resubmit once everything has flushed through.
Thanks @TimTaylor & @gaborcsardi :)