Skip to content

Commit d42d1cf

Browse files
jangoreckimattdowle
authored andcommitted
Attempt workaround of CRAN Windows hang on update.dev.pkg.Rd example (#5421)
1 parent f28ac88 commit d42d1cf

10 files changed

Lines changed: 30 additions & 25 deletions

File tree

.appveyor.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,9 @@ environment:
1616
global:
1717
CRAN: http://cloud.r-project.org
1818
WARNINGS_ARE_ERRORS: 1
19-
R_CHECK_ARGS: --no-manual
20-
# R_CHECK_ARGS specified in order to turn off --as-cran (on by default) as that can be slow
21-
R_ARCH: x64
22-
# multiarch is on by default which runs tests on both 32bit R and 64bit R in one x64 job; i.e. very nice and convenient for all.
23-
# The default for R_ARCH is i386, though, for which multiarch would just compile and test 32bit, hence setting R_ARCH to x64
24-
GCC_PATH: mingw_64
25-
# Default GCC_PATH appears to be gcc-4.6.3 which is now unsupported as from Rtools.exe v3.4.
19+
R_CHECK_ARGS: --as-cran --no-manual
20+
# --no-manual to avoid error 'pdflatex is not available'
21+
# --as-cran no longer a lot slower (now takes under 6 mins with and without); logs show _R_CHECK_CRAN_INCOMING_=FALSE which could take 5+ mins
2622
_R_CHECK_NO_STOP_ON_TEST_ERROR_: true
2723
# continue tests even if some script failed
2824
_R_CHECK_TESTS_NLINES_: 0

NAMESPACE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ S3method(melt, data.table)
127127
export(melt.data.table, dcast.data.table)
128128

129129
import(utils)
130-
S3method(update, dev.pkg)
131-
export(update.dev.pkg)
130+
export(update_dev_pkg)
132131
S3method(tail, data.table)
133132
S3method(head, data.table)
134133
import(stats)

NEWS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
**Benchmarks are regularly updated: [here](https://h2oai.github.io/db-benchmark/)**
44

5+
6+
17. `update.dev.pkg()` has been renamed `update_dev_pkg()` to get out of the way of the `stats::update` generic function, [#5421](https://github.com/Rdatatable/data.table/pull/5421). This is a utility function which upgrades the version of `data.table` to the latest commit in development which has also passed all tests. As such we don't expect any backwards compatibility concerns.
7+
8+
9+
# data.table [v1.14.4](https://github.com/Rdatatable/data.table/milestone/26?closed=1)
10+
11+
## NOTES
12+
13+
14+
515
# data.table [v1.14.2](https://github.com/Rdatatable/data.table/milestone/24?closed=1) (27 Sep 2021)
616

717
## NOTES

R/devel.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dcf.repo = function(pkg, repo, field, type) {
1717
dcf[dcf[,"Package"]==pkg, field][[1L]]
1818
}
1919

20-
update.dev.pkg = function(object="data.table", repo="https://Rdatatable.gitlab.io/data.table", field="Revision", type=getOption("pkgType"), lib=NULL, ...) {
20+
update_dev_pkg = function(object="data.table", repo="https://Rdatatable.gitlab.io/data.table", field="Revision", type=getOption("pkgType"), lib=NULL, ...) {
2121
# this works for any package, not just data.table
2222
pkg = object
2323
# perform package upgrade when new Revision present
@@ -32,7 +32,7 @@ update.dev.pkg = function(object="data.table", repo="https://Rdatatable.gitlab.i
3232
pkg, field, contrib.url(repo, type=type)))
3333
# see if Revision is different then currently installed Revision, note that installed package will have Revision info only when it was installed from remote devel repo
3434
upg = una || !identical(ups, dcf.lib(pkg, field, lib.loc=lib))
35-
# update.dev.pkg fails on windows R 4.0.0, we have to unload package namespace before installing new version #4403
35+
# update_dev_pkg fails on windows R 4.0.0, we have to unload package namespace before installing new version #4403
3636
on.exit({
3737
if (upg) {
3838
unloadNamespace(pkg) ## hopefully will release dll lock on Windows

R/onAttach.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
if (gettext("TRANSLATION CHECK", domain='R-data.table') != "TRANSLATION CHECK")
2424
packageStartupMessage(gettext("**********\nRunning data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-<locale>.po and po/<locale>.po files in the package source, where the native language and English error messages can be found side-by-side\n**********", domain="R-data.table"))
2525
if (dev && (Sys.Date() - as.Date(d))>28L)
26-
packageStartupMessage("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********")
26+
packageStartupMessage("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update_dev_pkg()\n**********")
2727
if (!.Call(ChasOpenMP))
2828
packageStartupMessage("**********\n",
2929
"This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.\n",

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
```r
4343
install.packages("data.table")
4444

45-
# latest development version:
46-
data.table::update.dev.pkg()
45+
# latest development version that has passed all tests:
46+
data.table::update_dev_pkg()
4747
```
4848

4949
See [the Installation wiki](https://github.com/Rdatatable/data.table/wiki/Installation) for more details.

man/data.table.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ if (interactive()) {
435435
# keep up to date with latest stable version on CRAN
436436
update.packages()
437437

438-
# get the latest devel version
439-
update.dev.pkg()
438+
# get the latest devel version that has passed all tests
439+
update_dev_pkg()
440440
# read more at:
441441
# https://github.com/Rdatatable/data.table/wiki/Installation
442442
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
\name{update.dev.pkg}
2-
\alias{update}
3-
\alias{update.dev.pkg}
1+
\name{update_dev_pkg}
2+
\alias{update_dev_pkg}
43
\title{Perform update of development version of a package}
54
\description{
6-
It will download and install package from devel repository only when new commit is available there, otherwise only PACKAGES file is transferred. Defaults are set to update \code{data.table}, other packages can be used as well. Their repository has to include git commit information in PACKAGES file.
5+
Downloads and installs latest development version only when a new commit is available which has also passed all tests. Defaults are set to update \code{data.table}, other packages can be used as well. Their repository has to include git commit information in PACKAGES file.
76
}
8-
\usage{\method{update}{dev.pkg}(object="data.table",
7+
\usage{update_dev_pkg(object="data.table",
98
repo="https://Rdatatable.gitlab.io/data.table",
109
field="Revision", type=getOption("pkgType"), lib=NULL, \dots)
1110
}
@@ -30,7 +29,8 @@
3029
NULL.
3130
}
3231
\examples{
33-
# data.table::update.dev.pkg()
32+
\dontshow{ # using if(FALSE) because \dontrun could still be run by --run-dontrun; #5421 }
33+
if (FALSE) data.table::update_dev_pkg()
3434
}
3535
\seealso{
3636
\code{\link{data.table}}

po/R-data.table.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ msgstr ""
13811381
msgid "**********\nRunning data.table in English; package support is available in English only. When searching for online help, be sure to also check for the English error message. This can be obtained by looking at the po/R-<locale>.po and po/<locale>.po files in the package source, where the native language and English error messages can be found side-by-side\n**********"
13821382
msgstr ""
13831383

1384-
msgid "**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********"
1384+
msgid "**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update_dev_pkg()\n**********"
13851385
msgstr ""
13861386

13871387
msgid "**********"

po/R-zh_CN.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,11 +1903,11 @@ msgstr ""
19031903
msgid ""
19041904
"**********\n"
19051905
"This development version of data.table was built more than 4 weeks ago. "
1906-
"Please update: data.table::update.dev.pkg()\n"
1906+
"Please update: data.table::update_dev_pkg()\n"
19071907
"**********"
19081908
msgstr ""
19091909
"**********这个data.table的开发版本是在4个多星期之前构建的。请更新版本:data."
1910-
"table::update.dev.pkg()\n"
1910+
"table::update_dev_pkg()\n"
19111911
"**********"
19121912

19131913
msgid "**********"

0 commit comments

Comments
 (0)