tidyverse / dtplyr

Data table backend for dplyr
https://dtplyr.tidyverse.org
Other
670 stars 57 forks source link

Test suite error with dplyr 1.1.0-1 #419

Closed tillea closed 1 year ago

tillea commented 1 year ago

Hi, the Debian CI uncovered a problem in connection with dplyr version 1.1.0-1:

...
https://ci.debian.net/data/autopkgtest/testing/amd64/r/r-cran-dtplyr/31650957/log.gz
...
[ FAIL 1 | WARN 1 | SKIP 25 | PASS 603 ]

══ Skipped tests ═══════════════════════════════════════════════════════════════
• On CRAN (24)
• transmuting grouping vars with nesting is not supported (1)

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-step-subset-slice.R:122'): slice_*() checks for empty ... ──────
Error in `slice_head(dt, 5)`: `n` must be explicitly named.
i Did you mean `slice_head(n = 5)`?
Backtrace:
    ▆
 1. ├─testthat::expect_error(slice_head(dt, 5), class = "rlib_error_dots_nonempty") at test-step-subset-slice.R:122:2
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. └─dplyr::slice_head(dt, 5)
 8.   └─dplyr:::check_slice_unnamed_n_prop(..., n = n, prop = prop)
 9.     └─rlang::abort(bullets, call = error_call)

[ FAIL 1 | WARN 1 | SKIP 25 | PASS 603 ]
Error: Test failures

This problem does not exist with dplyr version 1.0.10. Kind regards, Andreas.

markfairbanks commented 1 year ago

@eutwt @mgirlich I'm not sure what we're supposed to do here. We're collecting a snapshot of the error. Any idea what's causing the failure?

This issue is failing in the CRAN checks here: https://cran.r-project.org/web/checks/check_results_dtplyr.html

eutwt commented 1 year ago

From the CRAN log it looks like expect_snapshot is expecting an error of class "rlib_error_dots_nonempty", but the error class is different now

tryCatch(expr = slice_head(dt, 5), error = class)
#> [1] "rlang_error" "error"       "condition"

I'm not sure where that info is stored though, I don't see it in step-subset-slice.md

markfairbanks commented 1 year ago

Fixed by #422