Skip to content

Commit

Permalink
Advance deprecation status (#1478)
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley authored Mar 15, 2024
1 parent 364b9ec commit dd06766
Show file tree
Hide file tree
Showing 17 changed files with 140 additions and 139 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@

## Minor improvements and bug fixes

* Deprecation status of functions deprecated in previous versions (at least
2 years old) have been advanced. In particular, `src_sql()` is now defunct,
as is the use of `partial_eval()` with character `data`.

* Database errors now show the generated SQL, which hopefully will make it
faster to track down problems (#1401).

Expand Down
2 changes: 1 addition & 1 deletion R/backend-teradata.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ utils::globalVariables(c("ATAN2", "SUBSTR", "DECIMAL", "WEEKNUMBER_OF_YEAR", "SU
#' @export
#' @rdname win_over
win_rank_tdata <- function(f) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"2.4.0",
what = "win_rank_tdata()",
with = "win_rank()"
Expand Down
4 changes: 2 additions & 2 deletions R/db-sql.R
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,9 @@ sql_query_append <- function(con,
...,
returning_cols = NULL) {
if (is_tbl_lazy(from)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
when = "2.3.2",
what = "sql_query_append(from = 'must be a table identifier or an SQL query, not a lazy table.')",
what = "sql_query_append(from = 'must be a table identifier or an SQL query, not a lazy table.')"
)

insert_cols <- colnames(from)
Expand Down
4 changes: 1 addition & 3 deletions R/src-sql.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
#' @param con the connection object
#' @param ... fields used by object
src_sql <- function(subclass, con, ...) {
lifecycle::deprecate_warn(
lifecycle::deprecate_stop(
when = "1.4.0",
what = "src_sql()",
always = TRUE
)
subclass <- paste0("src_", subclass)
structure(list(con = con, ...), class = c(subclass, "src_sql", "src"))
}


Expand Down
19 changes: 8 additions & 11 deletions R/tidyeval.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,16 @@
#' f <- function(x) x + 1
#' partial_eval(quote(year > f(1980)), lf)
#' partial_eval(quote(year > local(f(1980))), lf)
partial_eval <- function(call, data, env = caller_env(), vars = NULL, error_call) {
if (!is_null(vars)) {
lifecycle::deprecate_warn("2.1.2", "partial_eval(vars)", always = TRUE)
data <- lazy_frame(!!!rep_named(vars, list(logical())))
partial_eval <- function(call,
data,
env = caller_env(),
vars = deprecated(),
error_call) {
if (lifecycle::is_present(vars)) {
lifecycle::deprecate_stop("2.1.2", "partial_eval(vars)")
}

if (is.character(data)) {
lifecycle::deprecate_warn(
"2.1.2",
"partial_eval(data = 'must be a lazy frame')",
always = TRUE
)
data <- lazy_frame(!!!rep_named(data, list(logical())))
lifecycle::deprecate_stop("2.1.2", "partial_eval(data = 'must be a lazy frame')", )
}

if (is_sql_literal(call)) {
Expand Down
12 changes: 3 additions & 9 deletions R/verb-group_by.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@
#' group_by(g) %>%
#' mutate(x2 = x / sum(x, na.rm = TRUE)) %>%
#' show_query()
group_by.tbl_lazy <- function(.data, ..., .add = FALSE, add = NULL, .drop = TRUE) {
group_by.tbl_lazy <- function(.data, ..., .add = FALSE, add = deprecated(), .drop = TRUE) {
dots <- partial_eval_dots(.data, ..., .named = FALSE)

if (!missing(add)) {
lifecycle::deprecate_warn(
"1.0.0",
"dplyr::group_by(add = )",
"group_by(.add = )",
always = TRUE
)
.add <- add
if (lifecycle::is_present(add)) {
lifecycle::deprecate_stop("1.0.0", "dplyr::group_by(add)", "group_by(.add)")
}

check_unsupported_arg(.drop, TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/verb-joins.R
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ join_prepare_by <- function(by,
user_env = caller_env(3)) {
if (identical(by, character()) && is.null(sql_on)) {
if (type != "cross") {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
when = "1.1.0",
what = I("Using `by = character()` to perform a cross join"),
with = "cross_join()",
Expand Down
2 changes: 1 addition & 1 deletion man/group_by.tbl_lazy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/partial_eval.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 11 additions & 12 deletions revdep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
|SQLDataFrame |? | | | |
|synaptome.db |? | | | |

## New problems (9)
## New problems (8)

|package |version |error |warning |note |
|:-------------------|:-------|:------|:-------|:----|
|[Andromeda](problems.md#andromeda)|0.6.5 |__+3__ | | |
|[CDMConnector](problems.md#cdmconnector)|1.3.0 |__+2__ | |1 |
|[childesr](problems.md#childesr)|0.2.3 |__+1__ | |1 |
|[CohortSurvival](problems.md#cohortsurvival)|0.3.0 |__+2__ | | |
|[diseasystore](problems.md#diseasystore)|0.1.1 |__+1__ | | |
|[DrugUtilisation](problems.md#drugutilisation)|0.5.0 |__+2__ | | |
|[IncidencePrevalence](problems.md#incidenceprevalence)|0.7.1 |__+2__ | | |
|[PatientProfiles](problems.md#patientprofiles)|0.6.1 |__+2__ | | |
|[SCDB](problems.md#scdb)|0.3 |__+3__ | | |
|package |version |error |warning |note |
|:-------------------|:-------|:--------|:-------|:----|
|[Andromeda](problems.md#andromeda)|0.6.5 |__+3__ |-1 | |
|[CDMConnector](problems.md#cdmconnector)|1.3.0 |__+2__ | |1 |
|[CohortSurvival](problems.md#cohortsurvival)|0.3.0 |__+2__ | | |
|[diseasystore](problems.md#diseasystore)|0.1.1 |__+1__ | | |
|[DrugUtilisation](problems.md#drugutilisation)|0.5.2 |__+2__ | | |
|[IncidencePrevalence](problems.md#incidenceprevalence)|0.7.1 |__+2__ | | |
|[PatientProfiles](problems.md#patientprofiles)|0.6.2 |1 __+1__ | | |
|[SCDB](problems.md#scdb)|0.3 |__+3__ | | |

8 changes: 2 additions & 6 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## revdepcheck results

We checked 111 reverse dependencies (100 from CRAN + 11 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
We checked 112 reverse dependencies (101 from CRAN + 11 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.

* We saw 9 new problems
* We saw 8 new problems
* We failed to check 0 packages

Issues with CRAN packages are summarised below.
Expand All @@ -19,9 +19,6 @@ Issues with CRAN packages are summarised below.
checking tests ... ERROR
checking re-building of vignette outputs ... ERROR

* childesr
checking re-building of vignette outputs ... ERROR

* CohortSurvival
checking tests ... ERROR
checking re-building of vignette outputs ... ERROR
Expand All @@ -38,7 +35,6 @@ Issues with CRAN packages are summarised below.
checking re-building of vignette outputs ... ERROR

* PatientProfiles
checking tests ... ERROR
checking re-building of vignette outputs ... ERROR

* SCDB
Expand Down
8 changes: 4 additions & 4 deletions revdep/failures.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Run `revdepcheck::cloud_details(, "CompoundDb")` for more info
* Version: NA
* GitHub: NA
* Source code: https://github.com/cran/CuratedAtlasQueryR
* Number of recursive dependencies: 197
* Number of recursive dependencies: 196

Run `revdepcheck::cloud_details(, "CuratedAtlasQueryR")` for more info

Expand Down Expand Up @@ -215,7 +215,7 @@ Run `revdepcheck::cloud_details(, "grasp2db")` for more info
* Version: NA
* GitHub: NA
* Source code: https://github.com/cran/msPurity
* Number of recursive dependencies: 185
* Number of recursive dependencies: 183

Run `revdepcheck::cloud_details(, "msPurity")` for more info

Expand Down Expand Up @@ -320,7 +320,7 @@ Run `revdepcheck::cloud_details(, "Organism.dplyr")` for more info
* Version: NA
* GitHub: NA
* Source code: https://github.com/cran/SQLDataFrame
* Number of recursive dependencies: 95
* Number of recursive dependencies: 93

Run `revdepcheck::cloud_details(, "SQLDataFrame")` for more info

Expand Down Expand Up @@ -355,7 +355,7 @@ Run `revdepcheck::cloud_details(, "SQLDataFrame")` for more info
* Version: NA
* GitHub: NA
* Source code: https://github.com/cran/synaptome.db
* Number of recursive dependencies: 151
* Number of recursive dependencies: 149

Run `revdepcheck::cloud_details(, "synaptome.db")` for more info

Expand Down
Loading

0 comments on commit dd06766

Please sign in to comment.