tidyverse / dtplyr

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

dplyr 1.0.8 #313

Closed romainfrancois closed 2 years ago

romainfrancois commented 2 years ago

released version of dtplyr uses dplyr:::find_var() which is about to be removed in dplyr 1.0.8.

dtplyr:::pull.dtplyr_step
function (.data, var = -1) 
{
    expr <- enquo(var)
    var <- dplyr:::find_var(expr, .data$vars)
    .data <- ungroup(.data)
    .data <- select(.data, !!sym(var))
    .data <- collect(.data)
    .data[[1]]
}

This causes e.g. package cohorts to fail in dplyr revdeps.

We could bring back find_var() in dplyr if dtplyr can't be easily released ?

romainfrancois commented 2 years ago

dtplyr also currently fails in dplyr 1.0.8 revdeps with:

── After ─────────────────────────────────────────────────────────────────────────────────────────────────────
> checking examples ... ERROR
  Running examples in ‘dtplyr-Ex.R’ failed
  The error most likely occurred in:

  > ### Name: filter.dtplyr_step
  > ### Title: Subset rows using column values
  > ### Aliases: filter.dtplyr_step
  > 
  > ### ** Examples
  > 
  > library(dplyr, warn.conflicts = FALSE)
  > 
  > dt <- lazy_dt(mtcars)
  > dt %>% filter(cyl == 4)
  Source: local data table [11 x 11]
  Call:   `_DT6`[cyl == 4]

      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
  1  22.8     4 108      93  3.85  2.32  18.6     1     1     4     1
  2  24.4     4 147.     62  3.69  3.19  20       1     0     4     2
  3  22.8     4 141.     95  3.92  3.15  22.9     1     0     4     2
  4  32.4     4  78.7    66  4.08  2.2   19.5     1     1     4     1
  5  30.4     4  75.7    52  4.93  1.62  18.5     1     1     4     2
  6  33.9     4  71.1    65  4.22  1.84  19.9     1     1     4     1
  # … with 5 more rows

  # Use as.data.table()/as.data.frame()/as_tibble() to access results
  > dt %>% filter(vs, am)
  Source: local data table [7 x 11]
  Call:   `_DT6`[vs & am]

      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
  1  22.8     4 108      93  3.85  2.32  18.6     1     1     4     1
  2  32.4     4  78.7    66  4.08  2.2   19.5     1     1     4     1
  3  30.4     4  75.7    52  4.93  1.62  18.5     1     1     4     2
  4  33.9     4  71.1    65  4.22  1.84  19.9     1     1     4     1
  5  27.3     4  79      66  4.08  1.94  18.9     1     1     4     1
  6  30.4     4  95.1   113  3.77  1.51  16.9     1     1     5     2
  # … with 1 more row

  # Use as.data.table()/as.data.frame()/as_tibble() to access results
  > 
  > dt %>%
  +   group_by(cyl) %>%
  +   filter(mpg > mean(mpg))
  Error in step_subset(parent, i = i) : 
    is.null(i) || is_expression(i) || is_step(i) is not TRUE
  Calls: %>% ... filter.dtplyr_step -> step_subset_i -> step_subset -> stopifnot
  Execution halted

> checking tests ... ERROR
  See below...

> checking dependencies in R code ... NOTE
  Missing object imported by a ':::' call: ‘dplyr:::find_var’

── Test failures ─────────────────────────────────────────────────────────────────────────────── testthat ────

> library(testthat)
> library(dtplyr)
> 
> test_check("dtplyr")
══ Skipped tests ═══════════════════════════════════════════════════════════════
• On CRAN (9)

══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-step-call-pivot_wider.R:3:3): can pivot all cols to wide ────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = key, values_from = val) at test-step-call-pivot_wider.R:3:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(df, names_from = key, values_from = val)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:16:3): non-pivoted cols are preserved ───
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = key, values_from = val) at test-step-call-pivot_wider.R:16:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(df, names_from = key, values_from = val)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:29:3): implicit missings turn into explicit missings ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─dplyr::collect(pivot_wider(df, names_from = key, values_from = val)) at test-step-call-pivot_wider.R:29:2
 2. ├─tidyr::pivot_wider(df, names_from = key, values_from = val)
 3. └─dtplyr:::pivot_wider.dtplyr_step(df, names_from = key, values_from = val)
 4.   ├─base::unique(pull(data, !!sym(names_from)))
 5.   ├─dplyr::pull(data, !!sym(names_from))
 6.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 7.     └─dplyr:::find_var
 8.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:43:3): error when overwriting existing column ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
     ▆
  1. ├─testthat::expect_error(...) at test-step-call-pivot_wider.R:43:2
  2. │ └─testthat:::expect_condition_matching(...)
  3. │   └─testthat:::quasi_capture(...)
  4. │     ├─testthat .capture(...)
  5. │     │ └─base::withCallingHandlers(...)
  6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  7. ├─tidyr::pivot_wider(df, names_from = key, values_from = val)
  8. └─dtplyr:::pivot_wider.dtplyr_step(df, names_from = key, values_from = val)
  9.   ├─base::unique(pull(data, !!sym(names_from)))
 10.   ├─dplyr::pull(data, !!sym(names_from))
 11.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 12.     └─dplyr:::find_var
 13.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:51:3): grouping is preserved ────────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─df %>% group_by(g) %>% ... at test-step-call-pivot_wider.R:51:2
 2. ├─tidyr::pivot_wider(., names_from = k, values_from = v)
 3. └─dtplyr:::pivot_wider.dtplyr_step(., names_from = k, values_from = v)
 4.   ├─base::unique(pull(data, !!sym(names_from)))
 5.   ├─dplyr::pull(data, !!sym(names_from))
 6.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 7.     └─dplyr:::find_var
 8.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:60:3): column with `...j` name can be used as `names_from` ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = ...8, values_from = val) at test-step-call-pivot_wider.R:60:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(df, names_from = ...8, values_from = val)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:76:3): names_glue affects output names & auto-converts data.table to lazy_dt ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = x:y, values_from = a:b, names_glue = "{x}{y}_{.value}") at test-step-call-pivot_wider.R:76:2
 2. └─dtplyr:::pivot_wider.data.table(...)
 3.   ├─tidyr::pivot_wider(...)
 4.   └─dtplyr:::pivot_wider.dtplyr_step(...)
 5.     ├─base::unique(pull(new_vars, .names_from))
 6.     ├─dplyr::pull(new_vars, .names_from)
 7.     └─dtplyr:::pull.dtplyr_step(new_vars, .names_from)
 8.       └─dplyr:::find_var
 9.         └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:84:3): can use names_glue without .value ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(...) at test-step-call-pivot_wider.R:84:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:95:3): can add name prefix ──────────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(...) at test-step-call-pivot_wider.R:95:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:107:3): can sort column names ───────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = chr, values_from = int, names_sort = TRUE) at test-step-call-pivot_wider.R:107:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:120:3): can sort column names with id ───
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = chr, values_from = int, names_sort = TRUE) at test-step-call-pivot_wider.R:120:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:144:3): can override default keys ───────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, id_cols = name, names_from = var, values_from = value) at test-step-call-pivot_wider.R:144:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:160:3): warning suppressed by supplying values_fn ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─... %>% collect() at test-step-call-pivot_wider.R:160:2
 2. ├─dplyr::collect(.)
 3. ├─tidyr::pivot_wider(., names_from = key, values_from = val, values_fn = list(val = list))
 4. └─dtplyr:::pivot_wider.dtplyr_step(...)
 5.   ├─base::unique(pull(data, !!sym(names_from)))
 6.   ├─dplyr::pull(data, !!sym(names_from))
 7.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 8.     └─dplyr:::find_var
 9.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:172:3): values_fn can be a single function ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = key, values_from = val, values_fn = sum) at test-step-call-pivot_wider.R:172:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:181:3): values_summarize applied even when no-duplicates ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─... %>% collect() at test-step-call-pivot_wider.R:181:2
 2. ├─dplyr::collect(.)
 3. ├─tidyr::pivot_wider(., names_from = key, values_from = val, values_fn = list(val = list))
 4. └─dtplyr:::pivot_wider.dtplyr_step(...)
 5.   ├─base::unique(pull(data, !!sym(names_from)))
 6.   ├─dplyr::pull(data, !!sym(names_from))
 7.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 8.     └─dplyr:::find_var
 9.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:203:3): can fill in missing cells ───────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
     ▆
  1. ├─testthat::expect_equal(widen()$x, c(1, NA)) at test-step-call-pivot_wider.R:203:2
  2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
  3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
  4. ├─dtplyr widen()
  5. │ └─... %>% collect() at test-step-call-pivot_wider.R:198:4
  6. ├─dplyr::collect(.)
  7. ├─tidyr::pivot_wider(., names_from = var, values_from = val, ...)
  8. └─dtplyr:::pivot_wider.dtplyr_step(...)
  9.   ├─base::unique(pull(data, !!sym(names_from)))
 10.   ├─dplyr::pull(data, !!sym(names_from))
 11.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 12.     └─dplyr:::find_var
 13.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:210:3): values_fill only affects missing cells ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(...) at test-step-call-pivot_wider.R:210:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:224:3): can pivot from multiple measure cols ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = var, values_from = c(a, b)) at test-step-call-pivot_wider.R:224:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-call-pivot_wider.R:234:3): can pivot from multiple measure cols using all keys ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─tidyr::pivot_wider(df, names_from = var, values_from = c(a, b)) at test-step-call-pivot_wider.R:234:2
 2. └─dtplyr:::pivot_wider.dtplyr_step(...)
 3.   ├─base::unique(pull(data, !!sym(names_from)))
 4.   ├─dplyr::pull(data, !!sym(names_from))
 5.   └─dtplyr:::pull.dtplyr_step(data, !!sym(names_from))
 6.     └─dplyr:::find_var
 7.       └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-join.R:85:3): simple left joins use [ ──────────────────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-step-join.R:85:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt1 %>% left_join(dt2, by = "x") %>% pull(x)
 5. ├─dplyr::pull(., x)
 6. └─dtplyr:::pull.dtplyr_step(., x)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-subset-filter.R:29:3): inlines external variables ──────────
Error in `step_subset(parent, i = i)`: is.null(i) || is_expression(i) || is_step(i) is not TRUE
Backtrace:
     ▆
  1. ├─testthat::expect_equal(...) at test-step-subset-filter.R:29:2
  2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
  3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
  4. ├─dt %>% filter(x %in% l) %>% show_query()
  5. ├─dplyr::show_query(.)
  6. ├─dplyr::filter(., x %in% l)
  7. └─dtplyr:::filter.dtplyr_step(., x %in% l)
  8.   └─dtplyr:::step_subset_i(.data, i)
  9.     └─dtplyr:::step_subset(parent, i = i)
 10.       └─base::stopifnot(is.null(i) || is_expression(i) || is_step(i))
── Error (test-step-subset-filter.R:60:3): can filter when grouped ─────────────
Error in `step_subset(parent, i = i)`: is.null(i) || is_expression(i) || is_step(i) is not TRUE
Backtrace:
    ▆
 1. ├─dt1 %>% group_by(x) %>% filter(sum(y) == 3) at test-step-subset-filter.R:60:2
 2. ├─dplyr::filter(., sum(y) == 3)
 3. └─dtplyr:::filter.dtplyr_step(., sum(y) == 3)
 4.   └─dtplyr:::step_subset_i(.data, i)
 5.     └─dtplyr:::step_subset(parent, i = i)
 6.       └─base::stopifnot(is.null(i) || is_expression(i) || is_step(i))
── Error (test-step-subset-filter.R:72:3): grouped filter doesn't reorder ──────
Error in `step_subset(parent, i = i)`: is.null(i) || is_expression(i) || is_step(i) is not TRUE
Backtrace:
    ▆
 1. ├─dt1 %>% group_by(x) %>% filter(TRUE) at test-step-subset-filter.R:72:2
 2. ├─dplyr::filter(., TRUE)
 3. └─dtplyr:::filter.dtplyr_step(., TRUE)
 4.   └─dtplyr:::step_subset_i(.data, i)
 5.     └─dtplyr:::step_subset(parent, i = i)
 6.       └─base::stopifnot(is.null(i) || is_expression(i) || is_step(i))
── Error (test-step-subset-slice.R:21:3): can slice when grouped ───────────────
Error in `step_subset(parent, i = i)`: is.null(i) || is_expression(i) || is_step(i) is not TRUE
Backtrace:
    ▆
 1. ├─dt1 %>% group_by(x) %>% slice(1) at test-step-subset-slice.R:21:2
 2. ├─dplyr::slice(., 1)
 3. └─dtplyr:::slice.dtplyr_step(., 1)
 4.   └─dtplyr:::step_subset_i(.data, i)
 5.     └─dtplyr:::step_subset(parent, i = i)
 6.       └─base::stopifnot(is.null(i) || is_expression(i) || is_step(i))
── Error (test-step-subset-slice.R:32:3): slicing doesn't sorts groups ─────────
Error in `step_subset(parent, i = i)`: is.null(i) || is_expression(i) || is_step(i) is not TRUE
Backtrace:
     ▆
  1. ├─testthat::expect_equal(...) at test-step-subset-slice.R:32:2
  2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
  3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
  4. ├─dt %>% group_by(x) %>% slice(1) %>% pull(x)
  5. ├─dplyr::pull(., x)
  6. ├─dplyr::slice(., 1)
  7. └─dtplyr:::slice.dtplyr_step(., 1)
  8.   └─dtplyr:::step_subset_i(.data, i)
  9.     └─dtplyr:::step_subset(parent, i = i)
 10.       └─base::stopifnot(is.null(i) || is_expression(i) || is_step(i))
── Error (test-step-subset-slice.R:74:3): min and max reorder results ──────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-step-subset-slice.R:74:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% slice_min(x, n = 2) %>% pull(id)
 5. ├─dplyr::pull(., id)
 6. └─dtplyr:::pull.dtplyr_step(., id)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-subset-slice.R:83:3): min and max ignore NA's (#4826) ──────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-step-subset-slice.R:83:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% slice_min(x, n = 2) %>% pull(id)
 5. ├─dplyr::pull(., id)
 6. └─dtplyr:::pull.dtplyr_step(., id)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-subset-slice.R:92:3): arguments to sample are passed along ──
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-step-subset-slice.R:92:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% slice_sample(n = 1, weight_by = wt) %>% pull(x)
 5. ├─dplyr::pull(., x)
 6. └─dtplyr:::pull.dtplyr_step(., x)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-step-subset-summarise.R:47:3): summarises sorts groups ──────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-step-subset-summarise.R:47:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% group_by(x) %>% summarise(n = n()) %>% pull(x)
 5. ├─dplyr::pull(., x)
 6. └─dtplyr:::pull.dtplyr_step(., x)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-tidyeval.R:103:3): can access functions in local env ────────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-tidyeval.R:103:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% summarise(n = f()) %>% pull()
 5. ├─dplyr::pull(.)
 6. └─dtplyr:::pull.dtplyr_step(.)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-tidyeval.R:135:3): n() is equivalent to .N ──────────────────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-tidyeval.R:135:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% summarise(n = n()) %>% pull()
 5. ├─dplyr::pull(.)
 6. └─dtplyr:::pull.dtplyr_step(.)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-tidyeval.R:148:3): row_number() is equivalent .I ────────────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-tidyeval.R:148:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% mutate(n = row_number()) %>% pull()
 5. ├─dplyr::pull(.)
 6. └─dtplyr:::pull.dtplyr_step(.)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-tidyeval.R:160:3): row_number(x) is equivalent to rank ──────────
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
    ▆
 1. ├─testthat::expect_equal(...) at test-tidyeval.R:160:2
 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
 3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
 4. ├─dt %>% mutate(n = row_number(x)) %>% pull()
 5. ├─dplyr::pull(.)
 6. └─dtplyr:::pull.dtplyr_step(.)
 7.   └─dplyr:::find_var
 8.     └─base::get(name, envir = asNamespace(pkg), inherits = FALSE)
── Error (test-tidyeval.R:202:3): non-Gforce verbs work ────────────────────────
Error in `step_subset(parent, vars = vars, groups = groups, arrange = arrange, 
    i = i, j = j, on = on)`: is.null(j) || is_expression(j) is not TRUE
Backtrace:
     ▆
  1. ├─testthat::expect_equal(...) at test-tidyeval.R:202:2
  2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
  3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
  4. ├─dt %>% summarise_at(vars(x), add) %>% pull()
  5. ├─dplyr::pull(.)
  6. └─dplyr::summarise_at(., vars(x), add)
  7.   ├─dplyr::summarise(.tbl, !!!funs)
  8.   └─dtplyr:::summarise.dtplyr_step(.tbl, !!!funs)
  9.     └─dtplyr:::step_subset_j(...)
 10.       └─dtplyr:::step_subset(...)
 11.         └─base::stopifnot(is.null(j) || is_expression(j))

[ FAIL 34 | WARN 0 | SKIP 9 | PASS 282 ]
Error: Test failures
Execution halted

2 errors x | 0 warnings ✓ | 1 note x
romainfrancois commented 2 years ago

This also breaks package immunarch:

Error (test-diversity.R:36:7): (code run outside of `test_that()`)
Error in `get(name, envir = asNamespace(pkg), inherits = FALSE)`: object 'find_var' not found
Backtrace:
 1. immunarch:::apply_DF_DT(...)
      at test-diversity.R:36:6
 7. dtplyr:::pull.dtplyr_step(., Div.count)
      at dplyr/R/pull.R:38:2
 8. dplyr:::find_var
 9. base::get(name, envir = asNamespace(pkg), inherits = FALSE)
hadley commented 2 years ago

I'll get to this next week.

hadley commented 2 years ago

Oh it's already fixed; I just need to release it. Will definitely do that early next week.