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

run_examples(): deprecated run and test arguments are missing with no default #2264

Closed
mjsteinbaugh opened this issue Aug 5, 2020 · 2 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@mjsteinbaugh
Copy link

Hi, I'm seeing a minor issue with run_examples() pop up:

packageVersion("devtools")
## [1] ‘2.3.1’

This works fine, as expected:

devtools::run_examples()

But this is erroring:

devtools::run_examples(fresh = TRUE)

Here's the backtrace:

Error in eval(substitute(function() devtools::run_examples(pkg = path,  : 
  argument "test" is missing, with no default
Calls: <Anonymous> -> eval
Backtrace:
    █
 1. └─devtools::run_examples(fresh = TRUE)
 2.   └─base::eval(...)
@njtierney
Copy link

I also confirm this:

devtools::run_examples(pkg = "~/github/njtierney/naniar", fresh = TRUE)
#> Error in eval(substitute(function() devtools::run_examples(pkg = path, : argument "test" is missing, with no default

Created on 2020-08-27 by the reprex package (v0.3.0)

Session info
devtools::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 4.0.2 (2020-06-22)
#>  os       macOS Mojave 10.14.6        
#>  system   x86_64, darwin17.0          
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_AU.UTF-8                 
#>  ctype    en_AU.UTF-8                 
#>  tz       Australia/Melbourne         
#>  date     2020-08-27                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date       lib source                            
#>  assertthat    0.2.1   2019-03-21 [1] CRAN (R 4.0.0)                    
#>  backports     1.1.9   2020-08-24 [1] CRAN (R 4.0.0)                    
#>  callr         3.4.3   2020-03-28 [1] CRAN (R 4.0.0)                    
#>  cli           2.0.2   2020-02-28 [1] CRAN (R 4.0.0)                    
#>  crayon        1.3.4   2017-09-16 [1] CRAN (R 4.0.0)                    
#>  desc          1.2.0   2018-05-01 [1] CRAN (R 4.0.0)                    
#>  devtools      2.3.1   2020-07-21 [1] CRAN (R 4.0.0)                    
#>  digest        0.6.25  2020-02-23 [1] CRAN (R 4.0.0)                    
#>  ellipsis      0.3.1   2020-05-15 [1] CRAN (R 4.0.0)                    
#>  evaluate      0.14    2019-05-28 [1] CRAN (R 4.0.0)                    
#>  fansi         0.4.1   2020-01-08 [1] CRAN (R 4.0.0)                    
#>  fs            1.5.0   2020-07-31 [1] CRAN (R 4.0.2)                    
#>  glue          1.4.1   2020-05-13 [1] CRAN (R 4.0.0)                    
#>  highr         0.8     2019-03-20 [1] CRAN (R 4.0.0)                    
#>  htmltools     0.5.0   2020-06-16 [1] CRAN (R 4.0.1)                    
#>  knitr         1.29    2020-06-23 [1] CRAN (R 4.0.0)                    
#>  magrittr      1.5     2014-11-22 [1] CRAN (R 4.0.0)                    
#>  memoise       1.1.0   2017-04-21 [1] CRAN (R 4.0.0)                    
#>  pkgbuild      1.1.0   2020-07-13 [1] CRAN (R 4.0.2)                    
#>  pkgload       1.1.0   2020-05-29 [1] CRAN (R 4.0.0)                    
#>  prettyunits   1.1.1   2020-01-24 [1] CRAN (R 4.0.0)                    
#>  processx      3.4.3   2020-07-05 [1] CRAN (R 4.0.0)                    
#>  ps            1.3.4   2020-08-11 [1] CRAN (R 4.0.2)                    
#>  R6            2.4.1   2019-11-12 [1] CRAN (R 4.0.0)                    
#>  remotes       2.2.0   2020-07-21 [1] CRAN (R 4.0.2)                    
#>  rlang         0.4.7   2020-07-09 [1] CRAN (R 4.0.0)                    
#>  rmarkdown     2.3.3   2020-08-27 [1] Github (rstudio/rmarkdown@204aa41)
#>  rprojroot     1.3-2   2018-01-03 [1] CRAN (R 4.0.0)                    
#>  sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 4.0.0)                    
#>  stringi       1.4.6   2020-02-17 [1] CRAN (R 4.0.0)                    
#>  stringr       1.4.0   2019-02-10 [1] CRAN (R 4.0.0)                    
#>  testthat      2.3.2   2020-03-02 [1] CRAN (R 4.0.0)                    
#>  usethis       1.6.1   2020-04-29 [1] CRAN (R 4.0.0)                    
#>  withr         2.2.0   2020-04-20 [1] CRAN (R 4.0.0)                    
#>  xfun          0.16    2020-07-24 [1] CRAN (R 4.0.2)                    
#>  yaml          2.2.1   2020-02-01 [1] CRAN (R 4.0.0)                    
#> 
#> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library

@mkirzon
Copy link

mkirzon commented Sep 14, 2020

I also confirm this, but the problem arises by the default call to devtools::run_examples(). After a little digging, I think the break was introduced in devtools 2.3.1 with a change that accidentally updated the argument names for a call to pkgload::run_example()

In 2.3.0

lapply(files, pkgload::run_example, test = test, run = run)

In 2.3.1

lapply(files, pkgload::run_example, run_donttest = run_donttest, 
        run_dontrun = run_dontrun)

@jimhester jimhester added the bug an unexpected problem or unintended behavior label Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants