Skip to content

Commit 4b16a7f

Browse files
authored
Attempt workaround of CRAN Windows hang on update.dev.pkg.Rd example (#5421)
1 parent 9757bdf commit 4b16a7f

File tree

10 files changed

+22
-20
lines changed

10 files changed

+22
-20
lines changed

.appveyor.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +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
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
2122
_R_CHECK_NO_STOP_ON_TEST_ERROR_: true
2223
# continue tests even if some script failed
2324
_R_CHECK_TESTS_NLINES_: 0

NAMESPACE

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

133133
import(utils)
134-
S3method(update, dev.pkg)
135-
export(update.dev.pkg)
134+
export(update_dev_pkg)
136135
S3method(tail, data.table)
137136
S3method(head, data.table)
138137
import(stats)

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,8 @@
605605

606606
16. The options `datatable.print.class` and `datatable.print.keys` are now `TRUE` by default. They have been available since v1.9.8 (Nov 2016) and v1.11.0 (May 2018) respectively.
607607

608+
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.
609+
608610

609611
# data.table [v1.14.2](https://github.com/Rdatatable/data.table/milestone/24?closed=1) (27 Sep 2021)
610612

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
@@ -27,7 +27,7 @@
2727
if (gettext("TRANSLATION CHECK") != "TRANSLATION CHECK")
2828
packageStartupMessagef("**********\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**********")
2929
if (dev && (Sys.Date() - as.Date(d))>28L)
30-
packageStartupMessagef("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********")
30+
packageStartupMessagef("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update_dev_pkg()\n**********")
3131
if (!.Call(ChasOpenMP)) {
3232
packageStartupMessagef("**********\nThis installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.\n", appendLF=FALSE)
3333
if (Sys.info()["sysname"] == "Darwin")

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
@@ -453,8 +453,8 @@ if (interactive()) {
453453
# keep up to date with latest stable version on CRAN
454454
update.packages()
455455

456-
# get the latest devel version
457-
update.dev.pkg()
456+
# get the latest devel version that has passed all tests
457+
update_dev_pkg()
458458
# read more at:
459459
# https://github.com/Rdatatable/data.table/wiki/Installation
460460
}
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
@@ -1567,7 +1567,7 @@ msgstr ""
15671567
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**********"
15681568
msgstr ""
15691569

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

15731573
msgid "**********"

po/R-zh_CN.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,11 +2161,11 @@ msgstr ""
21612161
msgid ""
21622162
"**********\n"
21632163
"This development version of data.table was built more than 4 weeks ago. "
2164-
"Please update: data.table::update.dev.pkg()\n"
2164+
"Please update: data.table::update_dev_pkg()\n"
21652165
"**********"
21662166
msgstr ""
21672167
"**********这个data.table的开发版本是在4个多星期之前构建的。请更新版本:data."
2168-
"table::update.dev.pkg()\n"
2168+
"table::update_dev_pkg()\n"
21692169
"**********"
21702170

21712171
msgid "**********"

0 commit comments

Comments
 (0)