devtools 2.2.1 is now on CRAN!
devtools makes package development easier by providing R functions that simplify and expedite common tasks. R Packages is a book based around this workflow, which you can read online for free ( 1st edition, in-progress 2nd edition).
Apart from the new features mentioned below this release also contains a number of smaller changes and bug fixes. As always a complete list of all the changes is available in the package Changelog.
create() function has been re-added to the package. This functions was
previously removed in favor of
usethis::create_package() but it turns out the
RStudio IDE uses
devtools::create() as part of its create new project dialog,
so removing the function would break this functionality in older versions of
create() is however simply an alias for
so you are free to use whichever you would prefer in your own use.
A new function
dev_sitrep() can be used to get a “situation report” about
your development setup. This is important when working on your own packages,
but also to help people get up and running quickly during developer events such
Tidyverse Dev Days. It
provides a series of checks that you have the latest versions of R, RStudio,
RTools and package dependencies, along with instructions on how to update them
ellipsis package provides a function
check_dots_used() which ensures that all arguments specified in
been used. Devtools uses
... to pass arguments down to base R functions such
install.packages(). If the arguments are invalid, such as mis-typing a
argument name they would often be silently ignored rather than throwing an
error. Using ellipsis instead causes a full error to occur in these cases,
catching many more bugs when they happen.
check_dots_used() is now used for
any devtools function taking
devtools 2.2.1 introduces a new option
devtools.ellipsis_action to control
the behavior of ellipsis in devtools. Because there are some cases, like when a
given package is already installed, that devtools does not actually use any of
the arguments in
devtools.ellipsis_action takes one of the following arguments
rlang::abort- to emit an error if arguments are unused
rlang::warn- to emit a warning if arguments are unused
rlang::inform- to emit a message if arguments are unused
rlang::signal- to emit a message if arguments are unused
rlang::signal will produce no output unless the custom condition is
caught, so it is the best way to retain backwards compatibility with devtools
behavior prior to 2.2.0.
We are of grateful to all of the 29 people who contributed not just code, but also issues and comments for this release: @amit0thesingularity, @bbimber, @Cervangirard, @dachosen1, @DavisVaughan, @deslaur, @djnavarro, @DSLituiev, @DzLGasoline, @f527, @hadley, @hrbrmstr, @IndrajeetPatil, @jameslamb, @jennybc, @jimhester, @jrowen, @k-doering-NOAA, @mezerji1365, @MichaelChirico, @neonira, @njtierney, @p-rocha, @programgirl, @realDongWang, @RoundNose, @rstub, @tbates, and @TomKellyGenetics