Skip to content

Commit a7bb903

Browse files
committed
Deprecate check_rhub()
1 parent e237931 commit a7bb903

File tree

7 files changed

+39
-96
lines changed

7 files changed

+39
-96
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* `test_coverage_active_file()` now reports if any tests failed and does
99
a better job of executing snapshot comparisons.
1010

11-
* `dev_mode()` is deprecated.
11+
* `dev_mode()` and `check_rhub()` are deprecated.
1212

1313
# devtools 2.4.5
1414

@@ -528,7 +528,7 @@ you should switch your package to depend on **usethis** directly instead.
528528
* `document()`, `load_all()`, `check()`, `build()` and `test()` now
529529
automatically save open files when they are run inside the RStudio IDE. (#1576)
530530

531-
* New `check_rhub()` function to check packages using <https://builder.r-hub.io/>.
531+
* New `check_rhub()` function to check packages using `https://builder.r-hub.io/`.
532532

533533
* `run_examples` was mistakenly passing `show` to
534534
`pkgload::run_example`, causing it to fail (@amcdavid, #1449)

R/r-hub.R

Lines changed: 20 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,28 @@
1-
21
#' Run CRAN checks for package on R-hub
32
#'
4-
#' It runs [build()] on the package, with the arguments specified
5-
#' in `args`, and then submits it to the R-hub builder at
6-
#' <https://builder.r-hub.io>. The `interactive` option controls
7-
#' whether the function waits for the check output. Regardless, after the
8-
#' check is complete, R-hub sends an email with the results to the package
9-
#' maintainer.
3+
#' @description
4+
#' `r lifecycle::badge("deprecated")`
105
#'
11-
#' @section About email validation on r-hub:
12-
#' To build and check R packages on R-hub, you need to validate your
13-
#' email address. This is because R-hub sends out emails about build
14-
#' results. See more at [rhub::validate_email()].
6+
#' This function is deprecated since the underlying function
7+
#' `rhub::check_for_cran()` is now deprecated and defunct. See [`rhub::rhubv2`]
8+
#' learn about the new check system, R-hub v2.
159
#'
16-
#' @param platforms R-hub platforms to run the check on. If `NULL`
17-
#' uses default list of CRAN checkers (one for each major platform, and
18-
#' one with extra checks if you have compiled code). You can also specify
19-
#' your own, see [rhub::platforms()] for a complete list.
20-
#' @param email email address to notify, defaults to the maintainer
21-
#' address in the package.
22-
#' @param interactive whether to show the status of the build
23-
#' interactively. R-hub will send an email to the package maintainer's
24-
#' email address, regardless of whether the check is interactive or not.
25-
#' @param build_args Arguments passed to `R CMD build`
26-
#' @param ... extra arguments, passed to [rhub::check_for_cran()].
10+
#' @param platforms R-hub platforms to run the check on.
11+
#' @param email email address to notify.
12+
#' @param interactive whether to show the status of the build.
13+
#' @param build_args Arguments passed to `R CMD build`.
14+
#' @param ... extra arguments, passed to `rhub::check_for_cran()`.
2715
#' @inheritParams check
28-
#' @family build functions
2916
#' @return a `rhub_check` object.
30-
#'
17+
#' @keywords internal
3118
#' @export
32-
33-
check_rhub <- function(pkg = ".",
34-
platforms = NULL,
35-
email = NULL,
36-
interactive = TRUE,
37-
build_args = NULL,
38-
...) {
39-
rlang::check_installed("rhub")
40-
pkg <- as.package(pkg)
41-
42-
built_path <- build(pkg$path, tempdir(), quiet = !interactive,
43-
args = build_args)
44-
on.exit(file_delete(built_path), add = TRUE)
45-
46-
check_dots_used(action = getOption("devtools.ellipsis_action", rlang::warn))
47-
48-
status <- rhub::check_for_cran(
49-
path = built_path,
50-
email = email,
51-
platforms = platforms,
52-
show_status = interactive,
53-
...
54-
)
55-
56-
if (!interactive) {
57-
cli::cli_inform(c(v = "R-hub check for package {.pkg {pkg$package}} submitted."))
58-
status
59-
} else {
60-
status
61-
}
19+
check_rhub <- function(
20+
pkg = ".",
21+
platforms = NULL,
22+
email = NULL,
23+
interactive = TRUE,
24+
build_args = NULL,
25+
...
26+
) {
27+
lifecycle::deprecate_stop("2.4.6", "check_rhub()")
6228
}

R/release.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ release <- function(pkg = ".", check = FALSE, args = NULL) {
8383
}
8484
}
8585

86-
if (yesno("Have you checked on R-hub (with `check_rhub()`)?")) {
86+
if (yesno("Have you checked on R-hub (see `?rhub::rhubv2`)?")) {
8787
return(invisible())
8888
}
8989

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,11 @@ look in the current working directory - this is a recommended practice.
7474
### Check and release:
7575

7676
* `check()` updates the documentation, then builds and checks the package locally.
77-
`check_win()` checks a package using
78-
[win-builder](https://win-builder.r-project.org/), and `check_rhub()` checks a package using
79-
[r-hub](https://log.r-hub.io/). This allows you to easily check
80-
your package on all systems CRAN uses before submission.
81-
82-
* `release()` makes sure everything is ok with your package (including asking
83-
you a number of questions), then builds and uploads to CRAN.
77+
* `check_win_release()`, `check_win_devel()`, and `check_mac_release()` check
78+
a package using [win-builder](https://win-builder.r-project.org/) or
79+
<https://mac.r-project.org/macbuilder/submit.html>.
80+
* `release()` and `submit_cran()` handle the mechanics of CRAN submission with
81+
or without, respectively, (re)-running lots of local checks.
8482

8583
## Learning more
8684

man/check_mac_release.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/check_rhub.Rd

Lines changed: 10 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/check_win.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)