Skip to content

Commit d38ecfb

Browse files
Add a version dependency for R.utils (#7328)
* Add a version dependency for R.utils * R.utils version error * codecov * also qualify R version * have to base:: for getRversion --------- Co-authored-by: Jan Gorecki <[email protected]>
1 parent edb044f commit d38ecfb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Version: 1.17.99
33
Title: Extension of `data.frame`
44
Depends: R (>= 3.4.0)
55
Imports: methods
6-
Suggests: bit64 (>= 4.0.0), bit (>= 4.0.4), R.utils, xts, zoo (>= 1.8-1), yaml, knitr, markdown
6+
Suggests: bit64 (>= 4.0.0), bit (>= 4.0.4), R.utils (>= 2.13.0), xts, zoo (>= 1.8-1), yaml, knitr, markdown
77
Description: Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete of columns by group using no copies at all, list columns, friendly and fast character-separated-value read/write. Offers a natural and flexible syntax, for faster development.
88
License: MPL-2.0 | file LICENSE
99
URL: https://r-datatable.com, https://Rdatatable.gitlab.io/data.table, https://github.com/Rdatatable/data.table

R/fread.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ yaml=FALSE, tmpdir=tempdir(), tz="UTC")
119119
if ((w <- endsWithAny(file, c(".gz", ".bgz",".bz2"))) || (gzsig <- is_gzip(file_signature)) || is_bzip(file_signature)) {
120120
if (!requireNamespace("R.utils", quietly = TRUE))
121121
stopf("To read %s files directly, fread() requires 'R.utils' package which cannot be found. Please install 'R.utils' using 'install.packages('R.utils')'.", if (w<=2L || gzsig) "gz" else "bz2") # nocov
122+
# not worth doing a behavior test here, so just use getRversion().
123+
if (packageVersion("R.utils") < "2.13.0" && base::getRversion() >= "4.5.0")
124+
stopf("Reading compressed files in fread requires R.utils version 2.13.0 or higher. Please upgrade R.utils.") # nocov
122125
FUN = if (w<=2L || gzsig) gzfile else bzfile
123126
decompFile = tempfile(tmpdir=tmpdir)
124127
on.exit(unlink(decompFile), add=TRUE)

0 commit comments

Comments
 (0)