Skip to content

Commit

Permalink
Attempt workaround of CRAN Windows hang on update.dev.pkg.Rd example (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki authored and mattdowle committed Oct 9, 2022
1 parent f28ac88 commit d42d1cf
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 25 deletions.
10 changes: 3 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ environment:
global:
CRAN: http://cloud.r-project.org
WARNINGS_ARE_ERRORS: 1
R_CHECK_ARGS: --no-manual
# R_CHECK_ARGS specified in order to turn off --as-cran (on by default) as that can be slow
R_ARCH: x64
# 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.
# The default for R_ARCH is i386, though, for which multiarch would just compile and test 32bit, hence setting R_ARCH to x64
GCC_PATH: mingw_64
# Default GCC_PATH appears to be gcc-4.6.3 which is now unsupported as from Rtools.exe v3.4.
R_CHECK_ARGS: --as-cran --no-manual
# --no-manual to avoid error 'pdflatex is not available'
# --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
_R_CHECK_NO_STOP_ON_TEST_ERROR_: true
# continue tests even if some script failed
_R_CHECK_TESTS_NLINES_: 0
Expand Down
3 changes: 1 addition & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ S3method(melt, data.table)
export(melt.data.table, dcast.data.table)

import(utils)
S3method(update, dev.pkg)
export(update.dev.pkg)
export(update_dev_pkg)
S3method(tail, data.table)
S3method(head, data.table)
import(stats)
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

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


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.


# data.table [v1.14.4](https://github.com/Rdatatable/data.table/milestone/26?closed=1)

## NOTES



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

## NOTES
Expand Down
4 changes: 2 additions & 2 deletions R/devel.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dcf.repo = function(pkg, repo, field, type) {
dcf[dcf[,"Package"]==pkg, field][[1L]]
}

update.dev.pkg = function(object="data.table", repo="https://Rdatatable.gitlab.io/data.table", field="Revision", type=getOption("pkgType"), lib=NULL, ...) {
update_dev_pkg = function(object="data.table", repo="https://Rdatatable.gitlab.io/data.table", field="Revision", type=getOption("pkgType"), lib=NULL, ...) {
# this works for any package, not just data.table
pkg = object
# perform package upgrade when new Revision present
Expand All @@ -32,7 +32,7 @@ update.dev.pkg = function(object="data.table", repo="https://Rdatatable.gitlab.i
pkg, field, contrib.url(repo, type=type)))
# 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
upg = una || !identical(ups, dcf.lib(pkg, field, lib.loc=lib))
# update.dev.pkg fails on windows R 4.0.0, we have to unload package namespace before installing new version #4403
# update_dev_pkg fails on windows R 4.0.0, we have to unload package namespace before installing new version #4403
on.exit({
if (upg) {
unloadNamespace(pkg) ## hopefully will release dll lock on Windows
Expand Down
2 changes: 1 addition & 1 deletion R/onAttach.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
if (gettext("TRANSLATION CHECK", domain='R-data.table') != "TRANSLATION CHECK")
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"))
if (dev && (Sys.Date() - as.Date(d))>28L)
packageStartupMessage("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update.dev.pkg()\n**********")
packageStartupMessage("**********\nThis development version of data.table was built more than 4 weeks ago. Please update: data.table::update_dev_pkg()\n**********")
if (!.Call(ChasOpenMP))
packageStartupMessage("**********\n",
"This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.\n",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
```r
install.packages("data.table")

# latest development version:
data.table::update.dev.pkg()
# latest development version that has passed all tests:
data.table::update_dev_pkg()
```

See [the Installation wiki](https://github.com/Rdatatable/data.table/wiki/Installation) for more details.
Expand Down
4 changes: 2 additions & 2 deletions man/data.table.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ if (interactive()) {
# keep up to date with latest stable version on CRAN
update.packages()

# get the latest devel version
update.dev.pkg()
# get the latest devel version that has passed all tests
update_dev_pkg()
# read more at:
# https://github.com/Rdatatable/data.table/wiki/Installation
}
Expand Down
12 changes: 6 additions & 6 deletions man/update.dev.pkg.Rd → man/update_dev_pkg.Rd
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
\name{update.dev.pkg}
\alias{update}
\alias{update.dev.pkg}
\name{update_dev_pkg}
\alias{update_dev_pkg}
\title{Perform update of development version of a package}
\description{
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.
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.
}
\usage{\method{update}{dev.pkg}(object="data.table",
\usage{update_dev_pkg(object="data.table",
repo="https://Rdatatable.gitlab.io/data.table",
field="Revision", type=getOption("pkgType"), lib=NULL, \dots)
}
Expand All @@ -30,7 +29,8 @@
NULL.
}
\examples{
# data.table::update.dev.pkg()
\dontshow{ # using if(FALSE) because \dontrun could still be run by --run-dontrun; #5421 }
if (FALSE) data.table::update_dev_pkg()
}
\seealso{
\code{\link{data.table}}
Expand Down
2 changes: 1 addition & 1 deletion po/R-data.table.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ msgstr ""
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**********"
msgstr ""

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

msgid "**********"
Expand Down
4 changes: 2 additions & 2 deletions po/R-zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -1903,11 +1903,11 @@ msgstr ""
msgid ""
"**********\n"
"This development version of data.table was built more than 4 weeks ago. "
"Please update: data.table::update.dev.pkg()\n"
"Please update: data.table::update_dev_pkg()\n"
"**********"
msgstr ""
"**********这个data.table的开发版本是在4个多星期之前构建的。请更新版本:data."
"table::update.dev.pkg()\n"
"table::update_dev_pkg()\n"
"**********"

msgid "**********"
Expand Down

0 comments on commit d42d1cf

Please sign in to comment.