Skip to content

Commit

Permalink
Force compilation when compile = TRUE (#202)
Browse files Browse the repository at this point in the history
Closes #93

Co-authored-by: Hadley Wickham <[email protected]>
  • Loading branch information
lionel- and hadley authored Jun 1, 2022
1 parent 321e655 commit 6dac764
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pkgload (development version)

* `load_all(compile = TRUE)` now forces a full recompilation (#93).

* The advice about running `rm()` to remove conflicts with objects in
the global environment is now clickable in RStudio (#199).

Expand Down
3 changes: 2 additions & 1 deletion R/load.r
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ load_all <- function(path = ".",

if (isTRUE(compile)) {
rlang::check_installed("pkgbuild", reason = "to compile packages with a `src/` directory.")
pkgbuild::compile_dll(path, force = TRUE, quiet = quiet)
pkgbuild::clean_dll(path)
pkgbuild::compile_dll(path, quiet = quiet)
} else if (identical(compile, NA)) {
rlang::check_installed("pkgbuild", reason = "to compile packages with a `src/` directory.")
pkgbuild::compile_dll(path, quiet = quiet)
Expand Down

0 comments on commit 6dac764

Please sign in to comment.