From 2545bd8fc88c4c24d5b00771b2b027e43e231e08 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Mon, 9 Dec 2024 17:13:08 -0800 Subject: [PATCH] Progress deprecated option to error --- R/onLoad.R | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/R/onLoad.R b/R/onLoad.R index 662f3132e..6ecc28e7a 100644 --- a/R/onLoad.R +++ b/R/onLoad.R @@ -1,15 +1,8 @@ # nocov start -.pkg.store = new.env() -.pkg.store$.unsafe.done = FALSE .unsafe.opt = function() { - if (.pkg.store$.unsafe.done) return(invisible()) - val = getOption("datatable.nomatch") - if (is.null(val)) return(invisible()) # not defined (it hasn't been defined in .onLoad since v1.12.4) - warningf("Option 'datatable.nomatch' is defined but is now ignored. Please see note 11 in v1.12.4 NEWS (Oct 2019), and note 14 in v1.14.2.") - # leave this as warning for a long time - .pkg.store$.unsafe.done = TRUE - invisible() + if (!is.null(getOption("datatable.nomatch"))) + stopf("Option 'datatable.nomatch' is defined but is now ignored. Please see note 11 in v1.12.4 NEWS (Oct 2019), and note 14 in v1.14.2.") } .Last.updated = vector("integer", 1L) # exported variable; number of rows updated by the last := or set(), #1885