From d18fd381fa3f3199eab852c0dff65274625fbd7d Mon Sep 17 00:00:00 2001 From: jangorecki Date: Tue, 27 Oct 2020 11:30:39 +0200 Subject: [PATCH 1/6] detect error from one CRAN machine --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a5b4845f8..d492b4071d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,6 +135,8 @@ test-rel-lin: ## most comprehensive tests, force all suggests, also integration _R_CHECK_CRAN_INCOMING_REMOTE_: "FALSE" _R_CHECK_FORCE_SUGGESTS_: "TRUE" _R_CHECK_TESTS_NLINES_: "0" + _R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_: "FALSE" ## detects S3 method lookup found on search path #4777 + _R_S3_METHOD_LOOKUP_REPORT_SEARCH_PATH_USES_: "TRUE" OPENBLAS_MAIN_FREE: "1" TEST_DATA_TABLE_WITH_OTHER_PACKAGES: "TRUE" before_script: From 2af9c22fa55997ae31414a535be9cfa29c54c5c2 Mon Sep 17 00:00:00 2001 From: jangorecki Date: Tue, 27 Oct 2020 11:56:36 +0200 Subject: [PATCH 2/6] try on R-devel --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d492b4071d..26caee13bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -199,6 +199,8 @@ test-dev-cran-lin: ## R-devel on Linux, --enable-strict-barrier --disable-long-d variables: _R_CHECK_CRAN_INCOMING_: "TRUE" _R_CHECK_CRAN_INCOMING_REMOTE_: "FALSE" + _R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_: "FALSE" ## detects S3 method lookup found on search path #4777 + _R_S3_METHOD_LOOKUP_REPORT_SEARCH_PATH_USES_: "TRUE" before_script: - *install-deps - *cp-src From 795977f80aa0e352211d0b7e5b1bc6594b0619ba Mon Sep 17 00:00:00 2001 From: jangorecki Date: Tue, 27 Oct 2020 12:18:18 +0200 Subject: [PATCH 3/6] only for r-devel --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 26caee13bd..4644a7b095 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,8 +135,6 @@ test-rel-lin: ## most comprehensive tests, force all suggests, also integration _R_CHECK_CRAN_INCOMING_REMOTE_: "FALSE" _R_CHECK_FORCE_SUGGESTS_: "TRUE" _R_CHECK_TESTS_NLINES_: "0" - _R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_: "FALSE" ## detects S3 method lookup found on search path #4777 - _R_S3_METHOD_LOOKUP_REPORT_SEARCH_PATH_USES_: "TRUE" OPENBLAS_MAIN_FREE: "1" TEST_DATA_TABLE_WITH_OTHER_PACKAGES: "TRUE" before_script: From dc7fbc479f9d24a7e1803c7eb482afb685ca796b Mon Sep 17 00:00:00 2001 From: jangorecki Date: Tue, 27 Oct 2020 12:44:33 +0200 Subject: [PATCH 4/6] do not export as.Date.IDate anymore --- NAMESPACE | 14 +++++--------- NEWS.md | 2 ++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index c2c095a1d8..fdf0c7ba22 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -151,8 +151,11 @@ S3method("+", IDate) S3method("-", IDate) S3method(as.character, ITime) S3method(as.data.frame, ITime) -S3method(as.Date, IDate) # note that zoo::as.Date masks base::as.Date. Both generic. -export(as.Date.IDate) # workaround for zoo bug, see #1500. Removing this export causes CI pipeline to fail on others.Rraw test 6, but I can't reproduce locally. +if (getRversion() >= "3.6.0") { + S3method(as.Date, IDate) +} else { + export(as.Date.IDate) +} S3method(as.IDate, Date) S3method(as.IDate, POSIXct) S3method(as.IDate, default) @@ -187,10 +190,3 @@ S3method(unique, ITime) S3method('[<-', IDate) S3method(edit, data.table) -# duplist -# getdots -# NCOL -# NROW -# which.first -# which.last - diff --git a/NEWS.md b/NEWS.md index 5e3fb88de6..24d8c554dd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ ## NOTES +1. `as.Date.IDate` is no longer an exported function, method dispatch should be used, [#4777](https://github.com/Rdatatable/data.table/issues/4777). + # data.table [v1.13.2](https://github.com/Rdatatable/data.table/milestone/19?closed=1) (19 Oct 2020) From 9bc753c79ece163c60bb4ed07a53399515cf6841 Mon Sep 17 00:00:00 2001 From: Matt Dowle Date: Mon, 2 Nov 2020 20:56:37 -0700 Subject: [PATCH 5/6] tweak news item --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 79772cb123..4c0b6fb7b5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,7 +14,7 @@ 1. Continuous daily testing by CRAN using latest daily R-devel revealed, within one day of the change to R-devel, that a future version of R would break one of our tests, [#4769](https://github.com/Rdatatable/data.table/issues/4769). The characters "-alike" were added into one of R's error messages, so our too-strict test which expected the error `only defined on a data frame with all numeric variables` will fail when it sees the new error message `only defined on a data frame with all numeric-alike variables`. We have relaxed the pattern the test looks for to `data.*frame.*numeric` well in advance of the future version of R being released. Readers are reminded that CRAN is not just a host for packages. It is also a giant test suite for R-devel. For more information, [behind the scenes of cran, 2016](https://www.h2o.ai/blog/behind-the-scenes-of-cran/). -2. The `as.Date.IDate` function is no longer exported to solve a new error in R-devel `S3 method lookup found 'as.Date.IDate' on search path`, [#4777](https://github.com/Rdatatable/data.table/issues/4777). The S3 method is still exported; i.e. `as.Date(x)` will still invoke the `as.Date.IDate` method when `x` is class `IDate`. The function had been exported too to solve a compatibility issue with xts/zoo which is no longer needed. +2. The `as.Date.IDate` function is no longer exported to solve a new error in R-devel `S3 method lookup found 'as.Date.IDate' on search path`, [#4777](https://github.com/Rdatatable/data.table/issues/4777). The S3 method is still exported; i.e. `as.Date(x)` will still invoke the `as.Date.IDate` method when `x` is class `IDate`. The function had been exported, in addition to exporting the method, to solve a compatibility issue with `zoo` (and `xts` which uses `zoo`) because `zoo` exports `as.Date` which masks `base::as.Date`. Happily, since zoo 1.8-1 (Jan 2018) made a change to its `as.IDate`, the workaround is no longer needed. # data.table [v1.13.2](https://github.com/Rdatatable/data.table/milestone/19?closed=1) (19 Oct 2020) From 6a20166142e3de7dfe2dd1387a26b07d05abc4ae Mon Sep 17 00:00:00 2001 From: Matt Dowle Date: Mon, 2 Nov 2020 21:47:38 -0700 Subject: [PATCH 6/6] removed the >=3.6, added comment there, added versions to suggests --- DESCRIPTION | 2 +- NAMESPACE | 6 +----- NEWS.md | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 06b7f33c3d..913b9e74a9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -63,7 +63,7 @@ Authors@R: c( person("Dirk","Eddelbuettel", role="ctb")) Depends: R (>= 3.1.0) Imports: methods -Suggests: bit64, curl, R.utils, xts, nanotime, zoo, yaml, knitr, rmarkdown +Suggests: bit64 (>= 4.0.0), bit (>= 4.0.4), curl, R.utils, xts, nanotime, zoo (>= 1.8-1), yaml, knitr, rmarkdown SystemRequirements: zlib 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. License: MPL-2.0 | file LICENSE diff --git a/NAMESPACE b/NAMESPACE index fdf0c7ba22..57271aa04d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -151,11 +151,7 @@ S3method("+", IDate) S3method("-", IDate) S3method(as.character, ITime) S3method(as.data.frame, ITime) -if (getRversion() >= "3.6.0") { - S3method(as.Date, IDate) -} else { - export(as.Date.IDate) -} +S3method(as.Date, IDate) # note that base::as.Date is masked by zoo::as.Date, #1500 #4777 S3method(as.IDate, Date) S3method(as.IDate, POSIXct) S3method(as.IDate, default) diff --git a/NEWS.md b/NEWS.md index 4c0b6fb7b5..826573d7b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,7 +14,7 @@ 1. Continuous daily testing by CRAN using latest daily R-devel revealed, within one day of the change to R-devel, that a future version of R would break one of our tests, [#4769](https://github.com/Rdatatable/data.table/issues/4769). The characters "-alike" were added into one of R's error messages, so our too-strict test which expected the error `only defined on a data frame with all numeric variables` will fail when it sees the new error message `only defined on a data frame with all numeric-alike variables`. We have relaxed the pattern the test looks for to `data.*frame.*numeric` well in advance of the future version of R being released. Readers are reminded that CRAN is not just a host for packages. It is also a giant test suite for R-devel. For more information, [behind the scenes of cran, 2016](https://www.h2o.ai/blog/behind-the-scenes-of-cran/). -2. The `as.Date.IDate` function is no longer exported to solve a new error in R-devel `S3 method lookup found 'as.Date.IDate' on search path`, [#4777](https://github.com/Rdatatable/data.table/issues/4777). The S3 method is still exported; i.e. `as.Date(x)` will still invoke the `as.Date.IDate` method when `x` is class `IDate`. The function had been exported, in addition to exporting the method, to solve a compatibility issue with `zoo` (and `xts` which uses `zoo`) because `zoo` exports `as.Date` which masks `base::as.Date`. Happily, since zoo 1.8-1 (Jan 2018) made a change to its `as.IDate`, the workaround is no longer needed. +2. `as.Date.IDate` is no longer exported as a function to solve a new error in R-devel `S3 method lookup found 'as.Date.IDate' on search path`, [#4777](https://github.com/Rdatatable/data.table/issues/4777). The S3 method is still exported; i.e. `as.Date(x)` will still invoke the `as.Date.IDate` method when `x` is class `IDate`. The function had been exported, in addition to exporting the method, to solve a compatibility issue with `zoo` (and `xts` which uses `zoo`) because `zoo` exports `as.Date` which masks `base::as.Date`. Happily, since zoo 1.8-1 (Jan 2018) made a change to its `as.IDate`, the workaround is no longer needed. # data.table [v1.13.2](https://github.com/Rdatatable/data.table/milestone/19?closed=1) (19 Oct 2020)