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

magrittr 2.0.1 + dbplyr 2.0.0 = could not find function "split_chain" #586

Closed
mr-c opened this issue Feb 1, 2021 · 2 comments
Closed

magrittr 2.0.1 + dbplyr 2.0.0 = could not find function "split_chain" #586

mr-c opened this issue Feb 1, 2021 · 2 comments

Comments

@mr-c
Copy link

mr-c commented Feb 1, 2021

Hello, in Debian the tests for dbplyr version 2.0.0 fail when magrittr version 2.0.1 is installed.

With magrittr 1.5, the dbplyr 2.0.0 tests pass just fine.

If we can't find a fix or workaround to apply to the Debian packages in February, then dbplyr and 20 other Debian packages that depend on it will be removed from the next stable release of Debian :-(

Is there a patch we can apply, or is this a harmless test that we can skip?

Many thanks,

BEGIN TEST testthat.R

R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(testthat)
> library(dbplyr)
>
> test_check("dbplyr")
Registering testing src: sqlite OK
══ Skipped tests
═══════════════════════════════════════════════════════════════
● identical(Sys.getenv("GITHUB_POSTGRES"), "true") is not TRUE (1)
● Need at least two srcs to compare (6)
● No MariaDB (3)
● No mssql (2)
● No postgres (2)
● On CRAN (60)

══ Failed tests
════════════════════════════════════════════════════════════════
── Error (test-translate-sql.R:75:3): magrittr pipe is translated
──────────────
Error: could not find function "split_chain"
Backtrace:1. ├─testthat::expect_identical(translate_sql(1 %>% is.na()),
translate_sql(is.na(1))) test-translate-sql.R:75:2
  2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
  3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
  4. ├─dbplyr::translate_sql(1 %>% is.na())
  5. │ └─dbplyr::translate_sql_(...)
  6. │   └─base::lapply(...)
  7. │     └─dbplyr:::FUN(X[[i]], ...)
  8. │       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
  9. │       └─rlang::eval_tidy(x, mask)
 10. └─1 %>% is.na()

[ FAIL 1 | WARN 0 | SKIP 74 | PASS 662 ]
Error: Test failures
@hadley
Copy link
Member

hadley commented Feb 2, 2021

This problem usually occurs because a package has copied the pipe, rather than re-exporting it (tidyverse/magrittr#238 (comment)). And indeed it looks like I've managed to do that 😢 . I'll fix, but you can also resolve the problem just by re-building the source packages.

@hadley hadley closed this as completed in 88b519a Feb 2, 2021
@mr-c
Copy link
Author

mr-c commented Feb 2, 2021

😆 Thanks for the patch! That fixed it for Debian. Updated package will be in the archive soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants