From 5ac729aa9a70fef297a634d2332ff8ff1af874fb Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Tue, 12 Oct 2021 08:53:13 -0400 Subject: [PATCH] Change default to eager reading Fixes https://github.com/tidyverse/readr/issues/1266 --- NEWS.md | 4 ++++ R/utils.R | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 40641010..12232a29 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # readr (development version) +* All readr functions again read eagerly by default. Unfortunately many users + experienced frustration from the drawbacks of lazy reading, in particular + locking files on Windows, so it was decided to disable lazy reading default. + However `options(readr.read_lazy = TRUE)` can be used to set the default to by lazy if desired. * New `readr.read_lazy` global option to control if readr reads files lazily or not (#1266) # readr 2.0.2 diff --git a/R/utils.R b/R/utils.R index 1c12bc38..eb974616 100644 --- a/R/utils.R +++ b/R/utils.R @@ -45,7 +45,7 @@ should_show_types <- function() { #' - `options(readr.read_lazy = FALSE)` #' @export should_read_lazy <- function() { - identical(getOption("readr.read_lazy", TRUE), TRUE) + identical(getOption("readr.read_lazy", FALSE), TRUE) } deparse2 <- function(expr, ..., sep = "\n") {