From 597b23ab45f90bf1790f8543d297a78b9ca77802 Mon Sep 17 00:00:00 2001 From: Geoff99 Date: Fri, 14 Nov 2014 16:21:11 +1100 Subject: [PATCH] Use the (patched) update_collate in load_all --- R/load.r | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/R/load.r b/R/load.r index 202383b47..6d08ec1b2 100644 --- a/R/load.r +++ b/R/load.r @@ -92,6 +92,14 @@ load_all <- function(pkg = ".", reset = TRUE, recompile = FALSE, if (!quiet) message("Loading ", pkg$package) + # Apply any @includes to update the Collate entry in the DESCRIPTION file + # Presumes roxygen2::update_collate has been patched + # to do nothing if there are no @includes + roxygen2::update_collate(pkg$path) + # Refresh the pkg structure with any updates to the Collate entry + pkg <- as.package(pkg$path) + + # Reloading devtools is a special case. Normally, objects in the # namespace become inaccessible if the namespace is unloaded before the # the object has been accessed. This is kind of a hack - using as.list