hadley/devtools — pull request #550 by Geoff99 (2014-08-12 22:42:45+00:00)
Title: Fix devtools::load_all to ensure collation sequence is correct and up to...

... date

I have experienced a couple of related issues using the devtools /
roxygen2 combination to develop and document a package. Both issues
relate to inheritance, and the file collation order for the package
(which roxygen2 very nicely generates from the @include tags in the
roxygen comments in my R code). I am using devtools 1.5.0.99 and
roxygen2 4.0.1

For details of the issues see :
1) issue 261 , devtools::load_all not happy :
https://github.com/klutometis/roxygen/issues/261
https://groups.google.com/forum/#!topic/rdevtools/N3wy684ccnA
https://groups.google.com/forum/#!topic/rdevtools/2TMDbDcPNA8
and
2) issue related to order of (inherited) parameters in documentation
from roxygen2
https://groups.google.com/forum/#!topic/rdevtools/KBd7X8UbqPg

These issues would be solved if :
1) devtools::load_all updated the Collate field in the description file
before attempting to load and evaluate the R code in the package
and
2) roxygen2::roxygenise read in and parsed the roxygen comment blocks
from R files in the order of the Collate sequence instead of from R
files in alphabetical filename sequence.

I have tried some 'proof of concept' tweaks to devtools::loadall and
roxygen2::roxygenise to trial this, and they do solve my immediate
problem.

My solutions are not as elegant and concise as the master devtools and
roxygen code (which is awesome!), and have not been tested in other 'use
cases', nor for efficiency, nor for other platforms (I am on Windows 7).
But perhaps they will be useful small contribution as a rough starting
point for other more experienced coders.

This is the tweak to devtools::load_all

Regards

Geoff Lee