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 shouldn't pass show to pkgload::run_example #1449

Closed
amcdavid opened this issue Jan 27, 2017 · 4 comments
Closed

run_examples shouldn't pass show to pkgload::run_example #1449

amcdavid opened this issue Jan 27, 2017 · 4 comments
Labels
bug an unexpected problem or unintended behavior load

Comments

@amcdavid
Copy link
Contributor

pkgload::run_example lacks a show parameter (not sure if this is intentional or an oversight), but devtools::run_examples tries to pass this parameter via lapply nonetheless. This makes run_examples fail with the following:

Running 76 example files in devtools ------------------------------------------
Loading devtools
Error in FUN(X[[i]], ...) : unused argument (show = TRUE)
Loading devtools

Repex

$ git clone [email protected]:hadley/devtools.git

Cloning into 'devtools'...

$ cd devtools/
$ R
> run_examples()

Updating devtools documentation
Loading devtools
Updating roxygen version in /Users/amcdavid/Downloads/devtools/DESCRIPTION
Writing package_deps.Rd
Writing use_build_ignore.Rd
Writing use_readme_rmd.Rd
Writing install_svn.Rd
Writing install_version.Rd
Writing path.Rd
Writing reexports.Rd
Writing revdep_check.Rd
Writing devtools-deprecated.Rd
Running 76 example files in devtools ------------------------------------------
Loading devtools
Error in FUN(X[[i]], ...) : unused argument (show = TRUE)
Loading devtools

> sessionInfo()

R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.2

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] devtools_1.12.0.9000 knitr_1.15.1

loaded via a namespace (and not attached):
[1] Rcpp_0.12.9 roxygen2_5.0.1 crayon_1.3.2
[4] digest_0.6.12 withr_1.0.2 rprojroot_1.2
[7] R6_2.2.0 jsonlite_1.2 backports_1.0.5
[10] git2r_0.18.0 magrittr_1.5 httr_1.2.1
[13] stringi_1.1.2 rstudioapi_0.6 testthat_1.0.2
[16] whisker_0.3-2 callr_1.0.0.9000 tools_3.3.2
[19] stringr_1.1.0 pkgload_0.0.0.9000 pkgbuild_0.0.0.9000
[22] memoise_1.0.0

amcdavid added a commit to amcdavid/devtools that referenced this issue Jan 27, 2017
amcdavid added a commit to amcdavid/devtools that referenced this issue Jan 27, 2017
@amcdavid
Copy link
Contributor Author

Additionally, in the pkgload refactor, dev_help was moved and is currently not re-exported by devtools. Is this the intended API? If so, a deprecation message to users about this change seems appropriate, since it was a public function in devtools previously.

@lbusett
Copy link
Contributor

lbusett commented Jul 15, 2017

HI. I have the same issue: run_example fails with

Error in FUN(X[[i]], ...) : unused argument (show = TRUE)

sessionInfo()

R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] devtools_1.13.2.9000

loaded via a namespace (and not attached):
[1] compiler_3.4.1 tools_3.4.1 withr_1.0.2 memoise_1.1.0 pkgload_0.0.0.9000
[6] digest_0.6.12 pkgbuild_0.0.0.9000 rlang_0.1.1

@briancohn
Copy link

I am also getting this error

@hadley hadley added bug an unexpected problem or unintended behavior load labels Aug 1, 2017
Neil-Schneider pushed a commit to Neil-Schneider/devtools that referenced this issue Aug 9, 2017
jimhester pushed a commit that referenced this issue Aug 10, 2017
jimhester pushed a commit that referenced this issue Aug 10, 2017
jimhester pushed a commit that referenced this issue Aug 15, 2017
Squashed commit of the following.

commit dc389c8
Merge: adc3a78 a06b67d
Author: schneidernw <[email protected]>
Date:   Tue Aug 15 12:30:55 2017 -0400

    Merge remote-tracking branch 'hadley/master' into refactor_run_examples_1454

commit adc3a78
Merge: 751aec1 0128ed8
Author: schneidernw <[email protected]>
Date:   Thu Aug 10 16:30:55 2017 -0400

    Merge remote-tracking branch 'hadley/master' into refactor_run_examples_1454

commit 751aec1
Author: Neil-Schneider <[email protected]>
Date:   Thu Aug 10 14:28:52 2017 -0400

    Add leading characters to expected output

    Do this because the test fails because `\n>` is captured by the function in this test environment. Not sure it is a platform issue, but on my windows machine both tests, with and without `\n>` pass.

commit 0cde9d5
Author: schneidernw <[email protected]>
Date:   Wed Aug 9 14:35:13 2017 -0400

    Update documentation

    Do this for the run_example function and the testHelp package.

commit 40fedee
Author: schneidernw <[email protected]>
Date:   Wed Aug 9 14:30:48 2017 -0400

    Update style

    Do this to follow the style guide.

commit 30476c3
Author: Andrew McDavid <[email protected]>
Date:   Fri Jan 27 11:46:38 2017 -0500

    add test for run_examples #1449

commit 2ca091d
Author: schneidernw <[email protected]>
Date:   Wed Aug 9 14:04:28 2017 -0400

    Pass all necessary parameters to secondary call

    Do this because the `run_examples` call in a fresh session should be
    exactly like the first. (Minus `fresh = TRUE`)

commit 4282858
Author: schneidernw <[email protected]>
Date:   Wed Aug 9 14:02:58 2017 -0400

    Place code into else statement

    Do this to avoid running the code twice when `fresh = TRUE`.

commit 5809f12
Author: schneidernw <[email protected]>
Date:   Wed Aug 9 14:01:15 2017 -0400

    Show is deprecated

    Do this because the default value for `show` will trigger the
    deprecated
    warning every time. This shouldn't affect any backward
    compatibility
    since the parameter is currently unused. There is still an
    issue, where the warning is printed from the `callr::r()` when `fresh =
    TRUE`.
@lock
Copy link

lock bot commented Sep 18, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior load
Projects
None yet
Development

No branches or pull requests

5 participants