Skip to content

Assigned data paste0("check error/warning on ", par_type, " as ", other) must be compatible with existing data. #91

@marcburri

Description

@marcburri

Hi, I get the error below when I want to autotest my package (available here: https://github.com/p-wegmueller/reviser). pkgcheck runs through without error. Is there a problem with my package or with the autotest package? Surprisingly the error occurs earlier if I exclude certain functions from the test.

xt2 <- autotest_package (
+   package = "reviser",
+   test = TRUE
+ )
★ Extracting example code from 17 .Rd files
  |============================================================================================| 100%
✔ Extracted example code
★ Converting 15 examples to yaml
  |============================================================================================| 100%
✔ Converted examples to yaml

── autotesting reviser ──

✔ [1 / 16]: get_days_to_release
✔ [2 / 16]: get_first_efficient_release
✔ [3 / 16]: get_first_release
✔ [4 / 16]: get_fixed_release
✔ [5 / 16]: get_latest_release
✔ [6 / 16]: get_nth_release
✔ [7 / 16]: get_releases_by_date
Error in `$<-`:
! Assigned data `paste0("check error/warning on ", par_type, " as ", other)` must be
  compatible with existing data.
✖ Existing data has 6 rows.
✖ Assigned data has 2 rows.
ℹ Only vectors of size 1 are recycled.
Caused by error in `vectbl_recycle_rhs_rows()`:
! Can't recycle input of size 2 to size 6.
Run `rlang::last_trace()` to see where the error occurred.
There were 14 warnings (use warnings() to see them)



> xt2 <- autotest_package (
+   package = "reviser",
+   test = TRUE,
+   exclude = c(
+     "get_releases_by_date",
+     "get_nth_release"
+     )
+   )
★ Extracting example code from 15 .Rd files
  |============================================================================================| 100%
✔ Extracted example code
★ Converting 13 examples to yaml
  |============================================================================================| 100%
✔ Converted examples to yaml

── autotesting reviser ──

✔ [1 / 14]: get_days_to_release
✔ [2 / 14]: get_first_efficient_release
✔ [3 / 14]: get_first_release
✔ [4 / 14]: get_fixed_release
✔ [5 / 14]: get_latest_release
Error in `$<-`:
! Assigned data `paste0("check error/warning on ", par_type, " as ", other)` must be
  compatible with existing data.
✖ Existing data has 6 rows.
✖ Assigned data has 2 rows.
ℹ Only vectors of size 1 are recycled.
Caused by error in `vectbl_recycle_rhs_rows()`:
! Can't recycle input of size 2 to size 6.
Run `rlang::last_trace()` to see where the error occurred.
There were 14 warnings (use warnings() to see them)

An here are the results from rlang::last_trace()

rlang::last_trace()
<error/tibble_error_assign_incompatible_size>
Error in `$<-`:
! Assigned data `paste0("check error/warning on ", par_type, " as ", other)` must be
  compatible with existing data.
✖ Existing data has 6 rows.
✖ Assigned data has 2 rows.
ℹ Only vectors of size 1 are recycled.
Caused by error in `vectbl_recycle_rhs_rows()`:
! Can't recycle input of size 2 to size 6.
---
Backtrace:
     ▆
  1. └─autotest::autotest_package(...)
  2.   ├─base::rbind(...)
  3.   │ └─base::rbind(deparse.level, ...)
  4.   └─autotest::autotest_yaml(...)
  5.     └─base::lapply(...)
  6.       └─autotest (local) FUN(X[[i]], ...)
  7.         └─autotest:::autotest_single_yaml(...)
  8.           ├─base::rbind(reports, autotest_rectangular(test_obj, test_data))
  9.           │ └─base::rbind(deparse.level, ...)
 10.           ├─autotest:::autotest_rectangular(test_obj, test_data)
 11.           └─autotest:::autotest_rectangular.autotest_obj(test_obj, test_data)
 12.             ├─base::rbind(ret, test_rect_as_other(x, test_data))
 13.             ├─autotest:::test_rect_as_other(x, test_data)
 14.             └─autotest:::test_rect_as_other.autotest_obj(x, test_data)
 15.               └─autotest:::pass_rect_as_other(x, these_tests)
 16.                 ├─base::`$<-`(`*tmp*`, "operation", value = `<chr>`)
 17.                 └─tibble:::`$<-.tbl_df`(`*tmp*`, "operation", value = `<chr>`)
 18.                   └─tibble:::tbl_subassign(...)
 19.                     └─tibble:::vectbl_recycle_rhs_rows(value, fast_nrow(xo), i_arg = NULL, value_arg, call)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions