Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: Hard-deprecate old API #631

Merged
merged 4 commits into from
Mar 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions R/multi.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @keywords internal
#' @export
colonnade <- function(x, has_row_id = TRUE, width = NULL, ...) {
deprecate_soft("1.7.0", "pillar::colonnade()", "pillar::tbl_format_setup()")
deprecate_stop("1.9.0", "pillar::colonnade()", "pillar::tbl_format_setup()")

if (!missing(...)) {
check_dots_empty(action = warn)
Expand Down Expand Up @@ -120,7 +120,7 @@ new_empty_col_sentinel <- function(type) {
#' @keywords internal
#' @export
squeeze <- function(x, width = NULL, ...) {
deprecate_soft("1.5.0", "pillar::squeeze()")
deprecate_stop("1.5.0", "pillar::squeeze()")

squeeze_impl(x, width, ...)
}
Expand Down Expand Up @@ -240,7 +240,7 @@ knit_print_squeezed_colonnade_tier <- function(x) {
#' @keywords internal
#' @export
extra_cols <- function(x, ...) {
deprecate_soft("1.5.0", "pillar::extra_cols()")
deprecate_stop("1.5.0", "pillar::extra_cols()")

if (!missing(...)) {
check_dots_used(action = warn)
Expand Down
2 changes: 1 addition & 1 deletion R/shaft-.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
new_pillar_shaft <- function(x, ..., width = NULL, min_width = width,
type_sum = NULL, class = NULL, subclass = NULL) {
if (!is.null(subclass)) {
deprecate_soft("1.4.0", "pillar::new_pillar_shaft(subclass = )", "new_pillar_shaft(class = )")
deprecate_stop("1.4.0", "pillar::new_pillar_shaft(subclass = )", "new_pillar_shaft(class = )")
class <- subclass
}

Expand Down
10 changes: 2 additions & 8 deletions R/tbl-format.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ print_tbl <- function(x, width = NULL, ...,
n_extra = NULL,
n = NULL, max_extra_cols = NULL, max_footer_lines = NULL) {
if (!is.null(n_extra)) {
deprecate_soft(
"1.6.2", "pillar::print(n_extra = )", "pillar::print(max_extra_cols = )",
user_env = caller_env(2)
)
deprecate_stop("1.6.2", "pillar::print(n_extra = )", "pillar::print(max_extra_cols = )")
if (is.null(max_extra_cols)) {
max_extra_cols <- n_extra
}
Expand Down Expand Up @@ -50,10 +47,7 @@ format_tbl <- function(x, width = NULL, ...,
check_dots_empty(action = signal)

if (!is.null(n_extra)) {
deprecate_soft(
"1.6.2", "pillar::format(n_extra = )", "pillar::format(max_extra_cols = )",
user_env = caller_env(2)
)
deprecate_stop("1.6.2", "pillar::format(n_extra = )", "pillar::format(max_extra_cols = )")
if (is.null(max_extra_cols)) {
max_extra_cols <- n_extra
}
Expand Down
12 changes: 9 additions & 3 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Revdeps

## Failed to check (1)

|package |version |error |warning |note |
|:----------|:-------|:-----|:-------|:----|
|incidence2 |1.2.3 |1 | | |

## New problems (1)

|package |version |error |warning |note |
|:----------------------------|:-------|:-----|:-------|:----|
|[RNeXML](problems.md#rnexml) |2.4.5 | |__+1__ | |
|package |version |error |warning |note |
|:-------|:-------|:------|:-------|:----|
|[prt](problems.md#prt)|0.1.5 |__+2__ |__+1__ | |

13 changes: 9 additions & 4 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
## revdepcheck results

We checked 3 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
We checked 100 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 1 new problems
* We failed to check 0 packages
* We failed to check 1 packages

Issues with CRAN packages are summarised below.

### New problems
(This reports the first line of each new failure)

* RNeXML
checking whether the namespace can be unloaded cleanly ... WARNING
* prt
checking examples ... ERROR
checking tests ... ERROR
checking re-building of vignette outputs ... WARNING

### Failed to check

* incidence2 (NA)
63 changes: 62 additions & 1 deletion revdep/failures.md
Original file line number Diff line number Diff line change
@@ -1 +1,62 @@
*Wow, no problems at all. :)*
# incidence2

<details>

* Version: 1.2.3
* GitHub: https://github.com/reconverse/incidence2
* Source code: https://github.com/cran/incidence2
* Date/Publication: 2021-11-07 22:00:02 UTC
* Number of recursive dependencies: 87

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

</details>

## In both

* checking whether package ‘incidence2’ can be installed ... ERROR
```
Installation failed.
See ‘/tmp/workdir/incidence2/new/incidence2.Rcheck/00install.out’ for details.
```

## Installation

### Devel

```
* installing *source* package ‘incidence2’ ...
** package ‘incidence2’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error : The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0.
Error: unable to load R code in package ‘incidence2’
Execution halted
ERROR: lazy loading failed for package ‘incidence2’
* removing ‘/tmp/workdir/incidence2/new/incidence2.Rcheck/incidence2’


```
### CRAN

```
* installing *source* package ‘incidence2’ ...
** package ‘incidence2’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error : The `x` argument of `as_tibble()` can't be missing as of tibble 3.0.0.
Error: unable to load R code in package ‘incidence2’
Execution halted
ERROR: lazy loading failed for package ‘incidence2’
* removing ‘/tmp/workdir/incidence2/old/incidence2.Rcheck/incidence2’


```
80 changes: 68 additions & 12 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,81 @@
# RNeXML
# prt

<details>

* Version: 2.4.5
* GitHub: https://github.com/ropensci/RNeXML
* Source code: https://github.com/cran/RNeXML
* Date/Publication: 2020-06-18 18:40:02 UTC
* Number of recursive dependencies: 141
* Version: 0.1.5
* GitHub: https://github.com/nbenn/prt
* Source code: https://github.com/cran/prt
* Date/Publication: 2022-07-18 09:40:02 UTC
* Number of recursive dependencies: 67

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

</details>

## Newly broken

* checking whether the namespace can be unloaded cleanly ... WARNING
* checking examples ... ERROR
```
---- unloading
Error in .mergeMethodsTable(generic, mtable, tt, attach) :
trying to get slot "defined" from an object of a basic class ("environment") with no slots
Calls: unloadNamespace ... <Anonymous> -> .updateMethodsInTable -> .mergeMethodsTable
Running examples in ‘prt-Ex.R’ failed
The error most likely occurred in:

> ### Name: print.prt
> ### Title: Printing prt
> ### Aliases: print.prt format.prt trunc_dt
>
> ### ** Examples
>
> cars <- as_prt(mtcars)
...
9. ├─base::format(x, ..., n = n, width = width, max_extra_cols = max_extra_cols)
10. └─prt:::format.prt(x, ..., n = n, width = width, max_extra_cols = max_extra_cols)
11. ├─base::format(trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols))
12. └─prt::trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols)
13. └─prt:::shrink_dt(df, rows)
14. └─pillar::colonnade(df, has_row_id = FALSE)
15. └─lifecycle::deprecate_stop("1.9.0", "pillar::colonnade()", "pillar::tbl_format_setup()")
16. └─lifecycle:::deprecate_stop0(msg)
17. └─rlang::cnd_signal(...)
Execution halted
```

* checking tests ... ERROR
```
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
16. │ │ └─base::is.factor(x)
17. │ └─base::paste0(...)
18. ├─base::format(x, ..., n = n, width = width, max_extra_cols = max_extra_cols)
19. └─prt:::format.prt(x, ..., n = n, width = width, max_extra_cols = max_extra_cols)
20. ├─base::format(trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols))
21. └─prt::trunc_dt(x, n = n, width = width, max_extra_cols = max_extra_cols)
22. └─prt:::shrink_dt(df, rows)
23. └─pillar::colonnade(df, has_row_id = FALSE)
24. └─lifecycle::deprecate_stop("1.9.0", "pillar::colonnade()", "pillar::tbl_format_setup()")
25. └─lifecycle:::deprecate_stop0(msg)
26. └─rlang::cnd_signal(...)

[ FAIL 4 | WARN 0 | SKIP 0 | PASS 257 ]
Error: Test failures
Execution halted
```

* checking re-building of vignette outputs ... WARNING
```
Error(s) in re-building vignettes:
...
--- re-building ‘prt.Rmd’ using rmarkdown
Quitting from lines 35-37 (prt.Rmd)
Error: processing vignette 'prt.Rmd' failed with diagnostics:
`colonnade()` was deprecated in pillar 1.9.0 and is now defunct.
ℹ Please use `tbl_format_setup()` instead.
--- failed re-building ‘prt.Rmd’

SUMMARY: processing the following file failed:
‘prt.Rmd’

Error: Vignette re-building failed.
Execution halted
```

6 changes: 1 addition & 5 deletions tests/testthat/_snaps/tbl-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,7 @@
---

Code
print(as_tbl(mtcars), width = 40, n_extra = 1)
Condition
Warning:
The `n_extra` argument of `print()` is deprecated as of pillar 1.6.2.
i Please use the `max_extra_cols` argument instead.
print(as_tbl(mtcars), width = 40, max_extra_cols = 1)
Output
# A data frame: 32 x 11
mpg cyl disp hp drat wt
Expand Down
Loading