pkgload
pkgload copied to clipboard
Running load_all() twice moves devtools_shims on the search path
To re produce, within any package project (named PACKAGE below) :
devtools::load_all(".")
#> ℹ Loading PACKAGE
search()
#> [1] ".GlobalEnv" "devtools_shims" "package:PACKAGE" "package:testthat" "tools:rstudio" "package:stats"
#> [7] "package:graphics" "package:grDevices" "package:utils" "package:datasets" "package:methods" "Autoloads"
#> [13] "package:base"
devtools::load_all(".")
#> ℹ Loading PACKAGE
search()
#> [1] ".GlobalEnv" "package:PACKAGE" "devtools_shims" "package:testthat" "tools:rstudio" "package:stats"
#> [7] "package:graphics" "package:grDevices" "package:utils" "package:datasets" "package:methods" "Autoloads"
#> [13] "package:base"
The second situation is actually better, because the package might implement its own versions of functions that end up in devtools_shims, making it challenging to work with this workflow.
I personally have this challenge as I redefine ?
in a package. Could we make the 2nd behavior above the unique one ?