Functions that use httr now explicitly check that it is installed(@catalamarti,#2573).
test_coverage() now works if the package has notbeen installed.
test_coverage_active_file() now reports if any testsfailed and does a better job of executing snapshot comparisons.
dev_mode() andcheck_rhub() aredeprecated.
check(cleanup =) was deprecated in devtools v1.11.0(2016-04-12) and was made defunct in v2.4.4 (2022-07-20). Thedocumentation is more clear now about recommended alternatives.
check(check_dir = NULL) is the new default, to alignwith the default behaviour of the underlyingrcmdcheck::rcmdcheck().
check(cran = TRUE) sets the env var_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_ toFALSE, in order to surface the"Namespace in Imports field not imported from" NOTE. Thisonly applies to R >= 4.2, due to favorable changes in the behaviourofR CMD check --as-cran (#2459).
test_active_file() passes the package onto totestthat so it can correctly set theTESTTHAT_PKG envvar(#2470).
test() andtest_active_file() onceagain work with testthat itself.
dev_mode() is deprecated (
install(reload = TRUE) now callspkgload::unregister() instead ofpkload::unload() (#2349). This allows the package to keepfunctioning if it is still in use in the R session (e.g. through eventhandlers).
test() no longer callsload_all()twice.test_active_file() now callsload_all()via testthat.
aspell_env_var() does a better job of matchingR CMD check behaviour, which is only to useaspell, nothunspell orispell(#2376).
Installing devtools now installs pkgdown, profvis, bench, miniUI,and urlchecker, ensuring that you have everything needed for packagedevelopment (#2388).
dev_sitrep() has been updated for the calendar-basedversion number scheme adopted by the RStudio IDE in September 2021(#2397, #2410).
Newcheck_mac_release() function to check a packageusing the macOS builder athttps://mac.r-project.org/macbuilder/submit.html (#2375)
Jenny Bryan is now the official maintainer.
release() andsubmit_cran() now recordsubmission details using the Debian Control File format, for bettermachine-readability. This file has a new name, CRAN-SUBMISSION (insteadof CRAN-RELEASE) and now includes package version, in addition to thefull SHA and a timestamp.
check_man() now works with R versions 4.1+(#2354)
test_active_file() now again works on windowsprojects stored under the user’s home directory (~)(#2355)
document(quiet = TRUE) now works without failure onwindows (#2351)
Minor test failure on R 4.2 has been fixed.
New Rstudio addin forrun_examples()(#2358)
build_readme() now uses thepathargument, as designed (#2344)
create() no longer opens projects by default toavoid duplicate projects opened by the RStudio IDE project template(#2347,
The RStudio addins now usetest_active_file() andtest_coverage_active_file() instead of the deprecatedtest_file() andtest_coverage_file()(#2339)
RStudio addins now run in interactive mode, rather thanbackground mode (
install(upgrade) now defaults to ‘default’ ratherthan ‘ask’. This allows you to control the default asking behavior withtheR_REMOTES_UPGRADE environment variable (#2345)
Thecheck_results() function has been removed. Itwas not used by any CRAN package, and much better alternatives areavailable in thercmdcheckpackage.
pkgload::inst() is no longer re-exported(#2218).
test_file() has been renamed totest_active_file() andtest_coverage_file()has been renamed totest_coverage_active_file() to avoid aname collision withtestthat::test_file(). The previousnames have been soft deprecated in this release, they will be harddeprecated in the next release and eventually removed. (#2125)
build_readme() now supports readme files located ininst/README.Rmd, as intended (#2333)
build_vignettes() now creates more specific.gitignore entries (
check() now only re-documents if you have a matchingversion of roxygen2 (#2263).
change_maintainer_email() now has a check to assesswhether the email is actually changed. If the email is not changed, thecode now stops such that an email is not accidentally sent to the wrongrecipient. (
run_examples(fresh = TRUE) again works without error(#2264)
The covr and DT packages have been moved from Imports toSuggests. They are only needed when runningtest_coverage()andtest_coverage_active_file() so now you’ll be promptedto install them when needed.
Switched to fs for all file system functions (#2331,
Now uses testthat 3.0.0 to powertest(),test_active_file(),test_coverage(), andtest_coverage_active_file(). The major difference is thattest_active_file() now generates a compact summary thattakes up less space on the console.
check_win_*() function now resets the email to theoriginal email after execution, this bug was fixed and crept back in(@muschellij2,#2152).
run_examples() argumentsrun andtest are deprecated in favor of the (hopefully) more clearrun_dontrun andrun_donttest(pkgload/#107).
Previously deprecated functionsdr_devtools() anddr_github() have been removed.
Documentation has been synced with remotes 2.2.0
build() now errors with a more informative errormessage when passed an invalidpkg. (#2177)
Newbuild_rmd() can build any.Rmd filein a clean session.
dev_sitrep() now works correctly when R is out ofdate (#2204)
install_dev_deps() now passes formal args ontoremotes::install_deps() (
spell_check() now checks ifspelling isinstalled and prompts users to install it if not (
submit_cran() now returns a more informative errorwhen the CRAN submission portal is down (#1958)
check() gains avignettes argument, tomore easily disable checks for vignettes (#2165).
check_win_*() function now resets the email to theoriginal email after execution (
check() now setsNOT_CRAN=true bydefault, as was originally intended (#2135).
install_deps() now supportsoptions("devtools.ellipsis_action") as well(#2169)
test() now takesstop_on_failure as aformal argument (FALSE by default) instead of in.... Itsvalue is still passed totestthat::test_dir as before(@infotroph,#2129).
test() andtest_coverage_file() gain aexport_all argument, which controls if all functions in apackage are automatically exported (#1201).
dev_sitrep() now works if run outside a packagedirectory (#2127).
release() now works if the package root is not inthe working directory.
test() now sets the collation order toC before running, which matches the behavior of tests whenrun withR CMD check (#2121)
Newoptions("devtools.ellipsis_action") option addedto control the action of ellipsis in devtools. This should be one of
rlang::abort - to emit an error if arguments areunusedrlang::warn - to emit a warning if arguments areunusedrlang::inform - to emit a message if arguments areunusedrlang::signal - to emit a message if arguments areunused Usingrlang::signal will produce no output unlessthe custom condition is caught, so it is the best way to retainbackwards compatibility with devtools behavior prior to 2.2.0. Thedefault behavior was also changed to issue a warning rather than anerror if any arguments are unused, as there are some cases wheredevtools does not need to install the package, so unused arguments arefalse positives (#2109).install() now throws an error when it fails, asintended (#2120)
install() now again reloads and re-attaches packagesif they were previously loaded (#2111).
release() no longer calls the deprecateddr_devtools() (#2105)
test() now explicitly passesstop_on_failure = FALSE totestthat::test_dir() (
create() added back, the RStudio IDE usescreate() in the create packages dialog, so removing it inversion 2.1.0 broke old versions of the IDE.
Newdev_sitrep() function to return informationabout your development environment and diagnose common problems. Theformer functionsdr_devtools() anddr_github()have been deprecated. (#1970)
All functions taking... now use the ellipsispackage. This catches errors when arguments are misspelled orincorrectly specified (#2016)
build_vignettes() now correctly installs thevignette builder if it is not already installed (#2089).
dev_sitrep() now uses the same endpoint to detectthe current RStudio version as the IDE (#2050).
document() gains aquiet parameter, tosilence output andcheck() now passes its quiet argument toit (#1986).
Add the DT package as a dependency, so thattest_coverage() andtest_coverage_file() workwithout having to install additional packages (#2085).
check_man() now succeeds whentools::undoc() returns empty results (#1944).
check_win_*() functions gain aemailargument, so temporarily change the email the check results will be sentto (#1723).
install() now explicitly unloads packages beforetrying to install a new version (#2094).
Allinstall_*() functions now attach build tools tothe PATH, which makes them work on Windows when RTools is not on thedefault PATH (#2093).
test_coverage_file() now works when there is not a 1to 1 correspondence between test and source files (#2011).
release() now works again whenpkg isnot the current working directory (#1974).
release() now works without error whenoptions("repos") is unnamed (#1956).
create() added, the RStudio IDE usescreate(), so removing it in version 2.1.0 broke oldversions of the IDE.
In several placeshttp: URLs were used instead ofhttps:, the most critical being in thecran_mirror,cran_pacakges, andcran_submission_url values which could have enableddiscrete activity disclosure and person-in-the-middle attacks(i.e. changing the contents while uploading/downloading). Allhttp: URLS have been changed tohttps: URLs.(@hrbrmstr,#2091)
testthat androxygen2 are now added toImports rather thanSuggests, so they areautomatically installed when you install devtools.create(),create_description(),setup()use_appveyor(),use_build_ignore(),use_code_of_conduct(),use_coverage(),use_cran_badge(),use_cran_comments(),use_data(),use_data_raw(),use_dev_version(),use_git(),use_git_hook(),use_github(),use_github_links(),use_gpl3_license(),use_mit_license(),use_news_md(),use_package(),use_package_doc(),use_rcpp(),use_readme_md(),use_readme_rmd(),use_revdep(),use_rstudio(),use_test(),use_testthat(),use_travis(),use_vignette(), have beenremoved after being deprecated in previous releases. Use the versions intheusethis packagedirectly.
check_cran(),revdep_check(),revdep_check_print_problems(),revdep_check_reset(),revdep_check_resume(),revdep_check_save_summary(),revdep_email()have been removed after being deprecated in previous releases. It isrecommended to use therevdepcheck packageinstead.
system_check(),system_output() havebeen removed after being deprecated in previous releases. It isrecommend to use theprocessxpackage instead.
build_win() has been removed, after being deprecatedin previous releases.
yesno() as used inrelease() now hasclearer synonyms for “yes” (
check_rhub gains a new argumentbuild_args for arguments passed toR CMD build.... is now passed torhub::check_for_cran() (
build_manual() now fails if the manual fails tobuild. (#2056)
test_file() andtest_coverage_file()now work with C and C++ files in the src/ directory as well.
Two tests are now skipped when run on CRAN, as they fail due toan outdated pandoc and restrictions on writing to the package libraryrespectively.
load_all() now accepts ‘package’ objects, regainingprevious behavior in devtools prior to 2.0.0 (#1923)
test(),test_coverage() andtest_coverage_file() now set theTESTTHAT_PKGenvironment variable, so it is more consistent with running the testsduringR CMD check (testthat#787).
check() now replaces existing environment variablesrather than appending them (#1914).
This is a minor release mainly fixing bugs which snuck through in thedevtools 2.0.0 release.
install() now correctly passes theupgrade parameter toremotes::install_deps()(@Paxanator,#1898).
install_deps() now again works from any directorywithin a package (#1905)
Add a RStudio addin fortest_coverage().
All tests which use remote resources are now skipped on CRAN, toavoid spurious failures
Devtools 2.0.0 is amajor release that contains work fromthe past year and a half, since the major devtools release (1.13.0).
This release splits the functionality indevtoolsinto a number of smaller packages which are simpler to develop and alsoeasier for other packages to depend on. In particular the followingpackages have been spun off in what we are calling the ‘consciousuncoupling’ ofdevtools.
install_github()).build()).load_all()).check()).revdep_check()).session_info()).use_test()).devtools will remain the main package developers will interact withwhen writing R packages; it will just rely on these other packagesinternally for most of the functionality.
There have been a number of breaking changes in this release, whilethis will cause some short term pain for users it will result in aeasier to understand API in the future, so we feel the tradeoff isworthwhile.
devtools::install() arguments have been changed asfollows.
local ->buildforce_deps ->forceupgrade_dependencies ->upgradethreads -> Removed, but you can useNcpus, which is passed by... toinstall.packages()metadata -> Removedout_dir -> Removedskip_if_log_exists -> Removedcheck() argumentcheck_version has beenrenamed toremote to better describe what tests aredisabled (#1811)
get_path(),set_path(),add_path() andon_path() have been removed,this functionality is available withwithr::with_path()(#1796).
Thelang argument tospell_check() wasremoved, for compatibility withspelling v1.1.(#1715)
The previously deprecatedwith_ functions have nowbeen removed. The functionality has been moved to thewithr package.
RCMD(),clean_source(),eval_clean() andevalq_clean() have beenremoved. These functions never worked terribly well, and have beenreplaced by the much better functions incallr.
build_win() has been renamed tocheck_win_release(),check_win_devel(), andcheck_win_oldrelease() (#1598).
Infrastructure functions (use_*) now use theimplementations inusethis and the versions indevtools are deprecated. If you use these from apackage you should switch your package to depend onusethis directly instead.
Therevdep_check_* functions have been deprecated infavor of therevdepcheck package.
system_check() andsystem_output() havebeen deprecated in factor of theprocessxpackage.
Allinstall_*() functions are now re-exported fromremotes rather than being defined indevtools
devtools now depends onroxygen2 6.1.0: this considerably simplifiesdevtools::document() and makes it more consistent withroxygen2::roxygenise().
test_file() function added to test one or more filesfrom a package (#1755).
test_coverage() function added to provide a helperto compute test coverage usingcovr (#1628).
test_file() andtest_coverage_file()now have RStudio addins (#1650)
test_file_coverage() function added to show the testcoverage of one or more files from a package. (#1755).
session_info() now uses the implementation in thesessioninfo package. Packages usingdevtools::session_info() are encouraged to switch to usingsessioninfo::session_info() instead.
package_info() function now re-exported from thesessioninfo package.
check() now usesrcmdcheck to runand parse R CMD check output (#1153).
Code related to simulating package loading has been pulled outinto a separate package,pkgload. The followingfunctions have been moved to pkgload without a shim:clean_dll(),compile_dll(),dev_example(),dev_help(),dev_meta(),find_topic(),imports_env(),inst(),load_code(),load_dll(),ns_env(),parse_ns_file(),pkg_env(). These functions are primarily for internaluse.
load_all() andunload() have been moved topkgload, butdevtools provides shims since these arecommonly used.
find_rtools(),setup_rtools(),has_devel(),compiler_flags(),build() andwith_debug() have moved to the newpkgbuild package.build() andwith_debug() are re-exported bydevtools
Thespell_check() code has been moved into the newspelling package and has thereby gained support forvignettes and package wordlists. Thedevtools functionnow wrapsspelling::spell_check_package().
check_win_*() now build the package withmanual = TRUE by default (#1890).
check() output now works more nicely with recentchanges torcmdcheck (#1874).
reload() now reloads loaded but not attachedpackages as well as attached ones.
Executedstyler::style_pkg() to update code style(#1851,
save_all() helper function wrapsrstudioapi::documentSaveAll() calls (#1850,
check() now allows users to run without--timings (#1655)
update_packages() better documented to advertise itcan be used to update packages installed by any of theinstall_* functions.
check() gains aincoming option totoggle the CRAN incoming checks.
build_vignette() gains akeep_md optionto allow keeping the intermediate markdown output (#1726)
remote_sha.github() now correctly looks up SHA inprivate repositories (#1827,
devtoolsuse_*() functions nowtemporarily set the activeusethis project if given apkg argument that is not the current directory. This provides backwardscompatibility with previous behavior (#1823).
Vignettes are now built in a separate process, and the package isinstalled before building the vignettes (#1822)
build_readme() added to build the README.md from aREADME.Rmd (#1762)
build_vignettes() now has aclean andupgrade arguments, to control cleaning of intermediatefiles and upgrading vignette dependencies respectively.(#1770).
release() gains an additional question ensuring youupdated codemeta.json if one exists (#1774, #1754)
test() now setsuseFancyQuotes = FALSEto better mimic the environment tests are run under withR CMD check (#1735).
test() no longer passes encoding argument totestthat::test_dir() (#1776)
install_url() can now install package binaries onwindows (#1765)
Fix skipping when installing from a full SHA (#1624)
addpkgdown::build_site() wrapper (
add pkgdown site (https://devtools.r-lib.org) (#1779,
install_version() can now install current version ofCRAN package on Windows and macOS (
The CRAN-RELEASE file is now added to .Rbuildignore(#1711)
check() andcheck_built() now have anerror_on argument to specify if they should throw an erroron check failures. When run non-interactively this is set to “warnings”unless specified.
check() now sets_R_CHECK_CRAN_INCOMING_REMOTE_ instead of_R_CHECK_CRAN_INCOMING_on R versions which support theformer option (#1271, #1276, #1702).
Now use cli package to draw rules - they are more aestheticallypleasing and the correct width in the RStudio build pane(#1627).
release() has been tweaked to reflect modernsubmission workflow and to ask questions rather than running code foryou (#1632).
document(),load_all(),check(),build() andtest() nowautomatically save open files when they are run inside the RStudio IDE.(#1576)
Newcheck_rhub() function to check packages usinghttps://builder.r-hub.io/.
run_examples was mistakenly passingshow topkgload::run_example, causing it tofail (@amcdavid,#1449)
Newbuild_manual() function that produces pdf manualfor the package (
If you use gitrelease() now generates a file calledCRAN-RELEASE that reminds you to tag the commit that yousubmitted to CRAN (#1198).
release() once again looks for additional releasequestions in the correct environment (#1434).
submit_cran() now checks that you’re ready tosubmit, since this is a potentially expensive operation (#1228)
check() defaults to runningdocument()only if you have used roxygen previously (#1437).
Signal an error if commas are missing in between remote entries(#1511,
build_vignettes() gains a quiet argument(#1543).
source_gist() works once more when there is only asingle file in the gist (#1266).
In order to not run test helpers indocument(), thehelpers argument of load_all() is set toFALSE (
Themy_unzip() function is now able to use theutils::unzip fallback when R is compiled from source withnounzip package present (
If thefoghorn package is installed,release() displays the results of the CRAN checks (#1672,
Bugfix for installing from git remote and not passing git2rcredentials (
Bugfix for installation of dependencies of dependencies (
Bugfix for installation of dependencies in CRAN-like repositoriessuch as those created by drat (
load_all() no longer automatically creates adescription for you.
use_test() template no longer includes uselesscomments (#1349)
Fixtest() compatibility with testthat versions1.0.2 (#1503).
Fixinstall_version(),install_bitbucket(),install_local(),install_url(),install_svn(),install_bioc() gainquiet arguments andproperly pass them to internal functions. (#1502)
spell_check gains adict argument toset a custom language or dictionary
release() now checks documentation for spellingerrors by default.
Newuse_gpl3_license() sets the license field inDESCRIPTION and includes a copy of the license inLICENSE.
Various minor improvements around checking of reversedependencies (#1284,
revdep_check() andrevdep_check_resume() gain a skip argument which takes acharacter vector of packages to skip.
revdep_check() andcheck_cran() gain aquiet_check argument. You can usequiet_check = FALSE to see the actual text of R CMD checkas it runs (not recommending with multiple threads).
revdep_check_resume() now takes...which can be used to override settings fromrevdep_check().For debugging a problem with package checks, tryrevdep_check(threads = 1, quiet_check = FALSE)
revdep_check() collects timing information intiming.md (#1319,
Package names and examples are sorted in case-insensitive Ccollation (#1322,
use_revdep() adds.gitignore entry forcheck database (#1321,
Own package is installed in temporary library for revdep checking(#1338,
Automated revdep check e-mails now can use the newmy_version andyou_cant_install variables. Thee-mail template has been updated to use these variables (#1285,
Installation failures are logged during revdep checking, bydefault inrevdep/install. Once an installation has failed,it is not attempted a second time (#1300,
Print summary table in README.md and problems.md (#1284,
Revdep check improvements (#1284)
Handle case of un-installed package being passed to session_info(#1281).
Using authentication to access Github package name. (#1262,
spell_check() checks for hunspell before running(#1475,
add_desc_package() checks for package dependenciescorrectly (#1463,
Remove deprecatedargs argument frominstall_git() to allow passthrough toinstall(#1373,
added aquiet argument toinstall_bitbucket(), with a default value ofFALSE (fixes issue #1345,
update_packages() allows for override of interactiveprompt (#1260,
use_test() template no longer includes uselesscomments (#1349)
Add encoding support intest_dir() call by addingreference to pkg$encoding (#1306,
Parse valid Git remote URLs that lack trailing.git,e.g. GitHub browser URLs (#1253,
Add acheck_bioconductor() internal function toautomatically install BiocInstaller() if it is not installed and theuser wants to do so.
Improve Git integration.use_git_ignore() anduse_git_config() gainquiet argument, testswork without settinguser.name anduser.emailGit configuration settings (#1320,
Improve Git status checks used inrelease() (#1205,@krlmlr).
Improved handling of localfile:// repositories ininstall() (#1284,
setup() andcreate() gain newquiet argument (#1284,
Avoid unnecessary query ofavailable_packages()(#1269,
Add cache setting to AppVeyor template (#1290,
Fix AppVeyor test by manually installingcurl(#1301).
install(dependencies = FALSE) doesn’t query theavailable packages anymore (
use_travis() now opens a webpage in your browser tomore easily activate a repo.
use_readme_rmd() anduse_readme() sharea common template with sections for package overview, GitHubinstallation (if applicable), and an example (
test() doesn’t load helpers twice anymore (
Fix auto download method selection forinstall_github() on R 3.1 which lacks “libcurl” incapabilities(). (
Fix removal of vignette files by not trying to remove files twiceanymore (#1291)
add timestamp to messages inbuild_win() (
Newinstall_bioc() function and bioc remote toinstall Bioconductor packages from their SVN repository.
install_dev_deps() gets everything you need to startdevelopment on source package - it installs all dependencies, androxygen2 (#1193).
use_dev_version() automates the process of switchingfrom a release version number by tweaking theDESCRIPTION,adding a heading toNEWS.md (if present), and checking intogit (if you use it) (#1076.)
use_github() accepts a host argument, similar toinstall_github() (
Update with Rtools-3.4 information, (
devtools now uses https to access the RStudio CRAN mirror if itwill work on your system (#1059)
Handle case when a GitHub request returns a non-JSON errorresponse. (
Suggested packages, including those specified asRemotes: are now installed after package installation. Thisallows you to use circularRemotes: dependencies for tworelated packages as long as one of the dependencies is a Suggestedpackage. (
bug fix for installation of binary packages on windows, they mustbe installed directly from a zip file. (
build_vignette() will now only install the“VignetteBuilder” if it’s not present, not try and upgrade it if it is(#1139).
clean_dll() Only removes package_name.def files andnow operates recursively. (
check_man() now prints a message if no problems arefound (#1187).
install_* functions andupdate_packages() refactored to allow updating of packagesinstalled using any of the install methods. (
install_github() now useshttps://api.github.com as the host argument, so users canspecify ‘http:’ or other protocols if needed. (
load_all() runs package hooks before sourcing testhelper files allowing test helper to make use of objects created when apackage is loaded or attached. (
revdep_check() will now create therevdep/ directory if it does not already exist(#1178).
source_gist() gains afilename argumentto specify a particular file to source from a GitHub gist. (
Add a default codecov.yml file to turn off commenting withuse_coverage() (
Bug fix for ‘nchar(text) : invalid multibyte string’ errors whenrunningwrite_dcf() on DESCRIPTION files with non-ASCIIencodings (#1224,
search_path_for_rtools() using the gcc-4.9.3toolchain when there is no rtools setting in the windows registry.(@jimhester,#1155)create_description() now setsEncoding: UTF-8. This helps non-English package authors(#1123).
Alluse_ function have been overhauled to be moreconsistent, particularly around notification. Most functions now alsoask to overwrite if a file already exists (#1074).
use_coverage() now adds covr to “Suggests”, ratherthan recommending you install it explicitly in.travis.yml.
use_cran_badge() now uses HTTPS URL (
use_github() now confirms that you’ve picked a goodtitle and description (#1092) and prints the url of the repo(#1063).
use_news(), anduse_test() open thefiles in RStudio (if you’re using it and have the rstudioapi packageinstalled).
use_testthat() tells you what it’s doing(#1056).
use_travis() generates a template compatible withthe newest R-travis.
use_readme_md() creates a basicREADME.md template (#1064).
use_revdep() has an updated template for the newrevdep check system (#1090,
Removed the deprecateduse_coveralls(),add_rstudio_project(),add_test_infrastructure(), andadd_travis().
Deprecatedbuild_github_devtools() has beenremoved.
check() now always succeeds (instead of throwing anerror whenR CMD check finds anERROR),returning an object that summarises the check failures.
check() gainsrun_dont_test andmanual arguments to control whether or not\donttest{} tests are tested, or manuals are built. Thisdefaults toFALSE, butrelease() runs checkwith it set toTRUE (#1071; #1087,
Thecleanup argument tocheck() isdeprecated: it now always returns the path to the checkdirectory.
check_built() allows you to runR CMD check on an already built package.
check_cran() suppresses X11 withDISPLAY = "".
release() has been tweaked to improve the order ofthe questions, and to ensure that you’re ok with problems. It warns ifbothinst/NEWS.Rd andNEWS.md exist (
release() gains anargs argument tocontrol build options, e.g. to allow passingargs = "--compact-vignettes=both" for packages with heavyPDF vignettes (
system_check() gains new argumentspathto controls the working directory of the command, andthrowto control whether or not it throws an error on command failure.env has been renamed to the more explicitenv_vars.
revdep_check() has been overhauled. Allrevdep_ functions now work like other devtools functions,taking a path to the package as the first argument.
revdep_check() now saves its results to disk ascheck/check.rds, and the otherrevdep()functions read from that cache. This also allows you to resume a partialrun withrevdep_check_resume(). This should be a big timesaver if something goes unexpected wrong in the middle of the checks.You can blow away the cache and start afresh withrevdep_check_reset().
revdep_check_save_summary() now createsREADME.md to save one level of clicking in github. It alsocreates aproblems.md that contains only results for onlypackages that had warnings or errors. Each problem is limited to at most25 lines of output - this avoids lengthy output for failing examples.revdep_check_print_problems() prints a bulleted list ofproblems, suitable for inclusion in yourcran-comments.md.
Summary results are reported as they come in, every then messagesyou’ll get a message giving elapsed and estimated remaining time.
An experimentalrevdep_email() emails individualmaintainers with theirR CMD check summary results (#1014).See testthat and dplyr for example usage.
There were a handful of smaller fixes:
revdep_check() doesn’t complain about missinggit2r package anymore (#1068,
Package index caches forrevdep_check() now time outafter 30 minutes.
revdep_check_save_logs() has been removed - it isjust not that useful.
revdep_check_summary() has been removed - it nevershould have been part of the exported API.
Devtools now uses new gcc toolchain on windows, if installed(
install_git() now allows you to pass credentials togit2r to specify specific ssh credentials (
load_all() now sources all test helpers if you usetestthat. This makes it much easier to interactively run tests (#1125).load_all() also correctly handlesunix andwindows subdirectories withinR (
build_win() defaults to only R-devel, since this ismost commonly what you want.
Help shims now inform you that you’re using developmentdocumentation (#1049).
git_sha1() Fix fetching the latest git commit sothat it also works for shallow git clones, i.e. git clones which makeuse of depth. (#1048, #1046,
curl,evaluate,roxygen2andrversions have been moved from Imports to Suggests tolighten the dependency load of devtools. If you run a function thatneeds one of the packages, you’ll prompted to install it (#962,
Devtools uses a new strategy for detecting RTools on windows: itnow only looks for Rtools if you need toload_all() orbuild() a package with compiled code. This should make iteasier to work with devtools if you’re developing pure R packages(#947).
package_file() lets you find files inside a package.It starts by finding the root directory of the package (i.e. thedirectory that containsDESCRIPTION) (#985).
use_news_md() adds a basicNEWS.mdtemplate (#957).
use_mit_license() writes the necessaryinfrastructure to declare and release an R package under the MIT licensein a CRAN-compliant way. (#995,
check(cran = TRUE) adds--run-donttestsince you do need to test code in\donttest() for CRANsubmission (#1002).
install() installs packages specified in theAdditional_repositories field, such as drat repositories.(#907, #1028,
install() gains ametadata argumentwhich lets you add extra fields to theDESCRIPTION oninstall. (#1027,
install_github() andinstall_git() onlydownloads and installs the package if the remote SHA1 reference differsfrom the currently installed reference (#903,
install_local() captures git and github informationand stores it in theDESCRIPTION (#1027,
install_version() is more robust when handlingmultiple repos (#943, #1030,
Bugfix forRemotes: feature that prevented it fromworking if devtools was not attached as is done in travis-r (#936,
check_dev_versions() checks only packagedependencies (#983).
check_man() replacescheck_doc() (sincemost other functions are named after the corresponding directory).check_doc() will hang around as an alias for theforeseeable future (#958).
create() produces a dummy namespace will fakecomment so roxygen2 will overwrite silently (#1016).
create() andsetup() are morepermissive – they now accept a path to either a new directory or emptydirectory. (#966,
document() now only runsupdate_collate() once.
load_all() resolves a longstanding lazy loaddatabase corruption issue when reloading packages which define S3methods on generics from base or other packages (#1001,
release_checks() gains two new checks:
check_vignette_titles() checks that your vignettetitles aren’t the default “Vignette Title” (#960,
check_news_md() checks thatNEWS.mdisn’t in your.Rbuildignore (since it’s now supported byCRAN, #1042).
revdep_check():
More verbose about which package is installed (#926,
Verifies the integrity of already downloaded package archives(#930,
Is now more tolerant of errors when retrieving the summary for achecked package (#929,
Whenncpus > 1, it includes the package name forwhen so you know which package has failed and can start looking at theoutput without needing to wait for all packages to finish (
Uses proper repository whenBiocInstaller::useDevel(TRUE) (#937,
Shimmedsystem.file() now respectsmustWork = TRUE and throws an error if the file does notexist (#1034).
use_appveyor() template now createsfailure.zip artifact instead of polluting the logs withR CMD check output (#1017,
use_cran_comments() template has been improved(#1038).
use_data() now warns when trying to save the sameobject twice, and stops if there is no object to save (#948,
use_revdep_check() no longer includesrevdep_check_save_logs in default template. I found I neverused the logs and they just cluttered up the package directory(#1003).
with_*() functions have moved into the withrpackage, and devtools functions have been deprecated (#925,
Avoid importing heavy dependencies to speed up loading (#830,@krlmlr).
Remove explicitlibrary(testthat) call intest() (#798,
as.package() andload_all() gain newargumentcreate. Like other functions with apkg argument,load_all() looks for aDESCRIPTION file in parent directories - ifcreate = TRUE it will be automatically created if there’s aR/ ordata/ directory (#852,
build_vignettes() gains dependencies argument (#825,@krlmlr).
build_win() now usescurl instead ofRCurl for ftp upload.
build_win() asks for consent to receive e-mail atmaintainer address in interactive mode (#800,
check() now uses a better strategy whencran = TRUE. Instead of attempting to simulate--as-cran behaviour by turning on certain env vars, it nowuses--as-cran and turns off problematic checks with envvars (#866). The problematiccran_env_vars() function hasbeen removed.
find_rtools() now looks for registry keys in bothHKCU (user) and HKLM (admin) locations (
install() can now install dependencies from remoterepositories by specifying them asRemotes in theDESCRIPTION file (#902,vignette("dependencies") for more details.
install_*() detects if called on a Bioconductorpackage and if so, automatically includes the Bioconductor repositoriesif needed (#895,
install_deps() now automatically upgrades out ofdate dependencies. This is typically what you want when you’re workingon a development version of a package. To suppress this behaviour, setupgrade_dependencies = FALSE (#863).install_deps() is more careful with... - thismeans additional arguments toinstall_* are more likely towork (#870).
install_gitorious() has been removed since gitoriousno longer exists (#913).
load_all() no longer fails if auseDynLib() entry in the NAMESPACE is incorrect. Thisshould make it easy to recover from an incorrect@useDynLib, because re-documenting() should nowsucceed.
release() works for packages not located at root ofgit repository (#845, #846,
revdep_check() now installssuggestedpackages by default (#808), and setsNOT_CRAN env var tofalse (#809). This makes testing more similar to CRAN sothat more packages should pass cleanly. It also setsRGL_USE_NULL totrue to stop rgl windows frompopping up during testing (#897). It also downloads all source packagesat the beginning - this makes life a bit easier if you’re on a flakyinternet connection (#906).
Newuninstall() removes installed package (#820,@krlmlr).
Adduse_coverage() function to add codecov.io orcoveralls.io to a project, deprecateuse_coveralls() (
use_cran_badge() uses canonical url form preferredby CRAN.
use_data() also works with data from the parentframe (#829,
use_git_hook() now creates.git/hooksif needed (#888)
GitHub integration extended:use_github() gains aprotocol argument (ssh or https), populates URL andBugReports fields of DESCRIPTION (only if non-existent or empty), pushesto the newly created GitHub repo, and sets a remote tracking branch.use_github_links() is a new exported function.dr_github() diagnoses more possible problems. (#642,
use_travis(): Default travis script leavesnotifications on default settings.
uses_testthat() andcheck_failures()are now exported (#824, #839,
use_readme_rmd() usesuses_git()correctly (#793).
with_debug() now useswith_makevars()rather thanwith_env(), because R reads compilationvariables from the Makevars rather than the environment (
Properly reset library path afterwith_lib() (#836,@krlmlr).
remove_s4classes() performs a topological sort ofthe classes (#848, #849,
load_all() warns (instead of failing) if importingsymbols, methods, or classes fromNAMESPACE fails (
Newdr_devtools() runs some common diagnostics: areyou using the latest version of R and devtools? It is run automaticallybyrelease() (#592).
use_code_of_conduct() adds a contributor code ofconduct from http://contributor-covenant.org. (#729)
use_coveralls() allows you to easily add testcoverage with coveralls (
use_git() sets up a package to use git, initialisingthe repo and checking the existing files.
use_test() adds a new test file (#769,
Newuse_cran_badge() adds a CRAN status badge thatyou can copy into a README file. Green indicates package is on CRAN.Packages not yet submitted or accepted to CRAN get a red badge.
build_vignettes() automatically installs theVignetteBuilder package, if necessary (#736).
install() andinstall_deps() gain a... argument, so additional arguments can be passed toutils::install.packages() (install_svn() optionally accepts a revision (install_version() now knows how to look in multiplerepos (#721).
package_deps() (anddev_package_deps())determines all recursive dependencies and whether or not they’reup-to-date (#663). Useupdate(package_deps("xyz")) toupdate out of date dependencies. This code is used ininstall_deps() andrevdep_check() - it’sslightly more aggressive than previous code (i.e. it forces you to usethe latest version), which should avoid problems when you go to submitto CRAN.
Newupdate_packages() will install a package (andits dependencies) only if they are missing or out of date(#675).
session_info() can now take a vector of packagenames, in which case it will print the version of those packages andtheir dependencies (#664).
Devtools now uses the git2r package to inspect git properties andinstall remote git packages withinstall_git(). This shouldbe considerably more reliable than the previous strategy which involvescalling the command linegit client. It has two smalldownsides:install_git() no longer accepts additionalargs, and must do a deep clone when installing.
dr_github() checks for common problems withgit/github setup (#643).
If you use git,release() now warns you if you haveuncommited changes, or if you’ve forgotten to synchronise with theremote (#691).
install_github() warns if repository containssubmodules (
Previously, devtools ran all external R processes withR --vanilla. Now it only suppresses user profiles, andconstructs a custom.Rprofile to override the default.Currently, this.Rprofile sets up thereposoption. Among others, this enables the cyclic dependency check indevtools::release (#602,
R_BROWSER andR_PDFVIEWER environmentvariables are set to “false” to suppress random windows opening duringchecks.
Devtools correctly identifies RTools 3.1 and 3.2 (#738), andpreserves continuation lines in theDESCRIPTION(#709).
dev_help() now usesnormalizePath().Hopefully this will make it more likely to work if you’re on windows andhave a space in the path.
lint() gains acache argument (
Fixed namespace issues related tostats::setNames()(#734, #772) andutils::unzip() (#761,
release() now reminds you to check the existing CRANcheck results page (#613) and shows file size before uploading to CRAN(#683,
RCMD() andsystem_check() are nowexported so they can be used by other packages. (
revdep_check() creates directories if needed(#759).
system_check() combines arguments with, not,. (#753)
test() gains an... argument so thatadditional arguments can be passed totestthat::test_dir(@jimhester,#747)
use_travis() now suggests you link to the svg iconsince that looks a little sharper. Default template setsCRAN: http://cran.rstudio.com/ to enable the cyclicdependency check.
NOT_CRAN envvar no longer overrides externally setvariable.
check(check_version = TRUE) also checks spelling oftheDESCRIPTION; if no spell checker is installed, awarning is given (#784,
Devtools now supports a new and improved style of revdep checkingwithuse_revdep(). This creates a new directory calledrevdep which contains acheck.R template. Runthis template to check all reverse dependencies, and save summarisedresults tocheck/summary.md. You can then check this fileinto git, making it much easier to track how reverse dependency resultschange between versions. The documentation forrevdep_check() is much improved, and should be more useful(#635)
I recommend that you specify a library to use when checking withoptions("devtools.revdep.libpath"). (This should be adirectory that already exists). This should be difference from yourdefault library to keep the revdep environment isolated from yourdevelopment environment.
I’ve also tweaked the output ofrevdep_maintainers() soit’s easier to copy and paste into an email (#634). This makes life alittle easier pre-release.
lint() runslintr::lint_package() tocheck style consistency and errors in a package. (
use_appveyor() sets up a package for testing withAppVeyor (@krlmlr,#549).
use_cran_comments() creates acran-comments.md template and adds it to.Rbuildignore to help with CRAN submissions.(#661)
use_git_hook() allows you to easily add a git hookto a package.
use_readme_rmd() sets up a template to generate aREADME.md from aREADME.Rmd withknitr.
Deprecateddoc_clean argument tocheck() has been removed.
Initial package version increate() is now0.0.0.9000 (#632).create() andcreate_description() checks that the package name is valid(#610).
load_all() runsroxygen2::update_collate() before loading code. Thisensures that files are sourced in the way you expect, as defined byroxygen@include tags. If you don’t have any@include tags, the collate will be not be touched(#623).
session_info() gainsinclude_baseargument to also display loaded/attached base packages (#646).
release() no longer asks if you’ve read the CRANpolicies since the CRAN submission process now asks the same question(#692).
release(check = TRUE) now runs some additional customchecks. These include:
Checking that you don’t depend on a development version of apackage.
Checking that the version number has exactly three components(#633).
release() now builds packages without the--no-manual switch, both for checking and for actuallybuilding the release package (#603,build() gains anadditional argumentmanual, defaulting toFALSE, andcheck() gains...unmodified tobuild().
use_travis() now sets an environment variable sothat any WARNING will also cause the build to fail (#570).
with_debug() andcompiler_flags() setCFLAGS etc instead ofPKG_CFLAGS.PKG_* are for packages to use, the raw values are for usersto set. (According tohttp://cran.rstudio.com/doc/manuals/r-devel/R-exts.html#Using-Makevars)
Newsetup() works likecreate() butassumes an existing, not necessarily empty, directory (#627,
When installing a pull request,install_github() nowuses the repository associated with the pull request’s branch (and notthe repository of the user who created the pull request) (#658,
missing_s3() works once again (#672)
Fixed scoping issues withunzip().
load_code() now executes the package’s code with thepackage’s root as working directory, just likeR CMD buildet al. (#640,
Don’t set non-portable compiler flags on Solaris.
The filetemplate.Rproj is now correctly installedand the functionuse_rstudio works as it should. (#595,
The functionuse_rcpp will now create the filesrc/.gitignore with the correct wildcards. (
The functionstest,document,load_all,build,check and anyfunction that applies to some package directory will work fromsubdirectories of a package (like the “R” or “inst/tests” directories).(#616,
create()create() no longer generatesman/directory - roxygen2 now does this automatically. It also no longergenerates an package-level doc template. If you want this, useuse_package_doc(). It also makes a dummy namespace so thatyou can build & reload without runningdocument()first.
Newuse_data() makes it easy to include data in apackage, either indata/ (for exported datasets) or inR/sysdata.rda (for internal data). (#542)
Newuse_data_raw() createsdata-raw/directory for reproducible generation ofdata/ files(#541).
Newuse_package() allows you to set dependencies(#559).
Newuse_package_doc() sets up an Roxygen templatefor package-level docs.
Newuse_rcpp() sets up a package to useRcpp.
use_travis() now figures out your github usernameand repo so it can construct the markdown for the build image.(#546)
Newuse_vignette() creates a draft vignette usingRmarkdown (#572).
renamedadd_rstudio_project() touse_rstudio(),add_travis() touse_travis(),add_build_ignore() touse_build_ignore(), andadd_test_infrastructure() touse_testthat()(old functions are aliased to new)
You can add arbitrary extra questions torelease()by defining a functionrelease_questions() in your package.Yourrelease_questions() should return a character vectorof questions to ask (#451).
release() uses new CRAN submission process, asimplemented bysubmit_cran() (#430).
Allinstall_* now use the same code and store muchuseful metadata. Currently onlysession_info() takesadvantage of this information, but it will allow the development offuture tools like generic update functions.
Vignettes are no longer installed by default because theypotentially require all suggested packages to also be installed. Usebuild_vignettes = TRUE to force building and to install allsuggested packages (#573).
install_bitbucket() has been bought into alignmentwithinstall_github(): this means you can now specify reposwith the compactusername/repo@ref syntax. Theusername is now deprecated.
install_git() has been simplified and many of thearguments have changed names for consistency with metadata for otherpackage installs.
install_github() has been considerably improved:
username is deprecated - please include the user inthe repo name:rstudio/shiny,hadley/devtoolsetc.
dependencies = TRUE is no longer forced (regressionin 1.5) (@krlmlr,#462).
Deprecated parametersauth_user,branch,pull andpassword haveall been removed.
Newhost argument which allows you to installpackages from github enterprise (#410, #506).
The GitHub API is used to download archive file (
To download a specified pull request, useref = github_pull(...) ("user/repo@*release" orref = github_release() (
install_gitorious() has been bought into alignmentwithinstall_github(): this means you can now specify reposwith the compactusername/repo@ref syntax. You must nowalways supply user (project) name and repo.
install_svn() lets you install an R package from asubversion repository (assuming you have subversion installed).
decompress() and henceinstall_url()now work when the downloaded file decompresses without additionaltop-level directory (#537).
If you’re using RStudio, and you’re trying to build a binarypackage without the necessary build tools, RStudio will prompt todownload and install the right thing. (#488)
Commands are no longer run withLC_ALL=C - this nolonger seems necessary (#507).
build(binary = TRUE) creates an even-more-temporarypackage library avoid conflicts (#557).
check_dir() no longer fails on UNC paths(#522).
check_devtools() also checks for dependencies ondevelopment versions of packages (#534).
load_all() no longer fails on partial loading of apackage containing S4 or RC classes (#577).
On windows,find_rtools() is now run on packageload, not package attach.
help(),?, andsystem.file() are now made available when a package isloaded withload_all(), even if the devtools package isn’tattached.
httr 0.3 required (
load_all() no longer gives an error when objectslisted as exports are missing.
Shim added forlibrary.dynam.unload().
loaded_packages() now returns package name and pathit was loaded from. (#486)
Theparenvs() function has been removed fromdevtools, because is now in the pryr package.
missing_s3() uses a better heuristic for determiningif a function is a S3 method (#393).
Newsession_info() provides useful information aboutyour R session. It’s a little more focussed thansessionInfo() and includes where packages where installedfrom (#526).
rstudioapi package moved from suggests to imports,since it’s always needed (it’s job is to figure out if rstudio isavailable, #458)
Implemented own versionutils::unzip() that throwserror if command fails and doesn’t print unneeded messages onnon-Windows platforms (#540).
Wrote own version ofwrite.dcf() that doesn’tbutcher whitespace and fieldnames.
Thefresh argument totest() has beenremoved - this is best done by the editor since it can run the tests ina completely clean environment by starting a new R session.
compile_dll() can now build packages located in R’stempdir() directory (
Four new functions make it easier to add useful infrastructure topackages:
add_test_infrastructure() will create testinfrastructure for a new package. It is called automatically fromtest() if no test directories are found, the session isinteractive and you agree.
add_rstudio_project() adds an RStudio project fileto your package.create() gains anrstudioargument which will automatically create an RStudio project in thepackage directory. It defaults toTRUE: if you don’t useRStudio, just delete the file.
add_travis() adds a basic travis template to yourpackage..travis.yml is automatically added to.Rbuildignore to avoid including it in the builtpackage.
add_build_ignore() makes it easy to add files to.Rbuildignore, correctly escaping specialcharacters
Two dependencies were incremented:
devtools requires at least R version 3.0.2.
document() requires at least roxygen2 version3.0.0.
build_win() now builds R-release and R-devel bydefault (@krlmlr,#438). It also gains parameterargs, which is passed on tobuild() (
check_doc() now runsdocument()automatically.
install() gainsthread argument whichallows you to install multiple packages in parallel (threads argument tocheck_cran() now defaultstogetOption("Ncpus")
install_deps(deps = T) no longer installs alldependencies of dependencies (#369).
install_github() now prefers personal access tokenssupplied toauth_token rather than passwords (#418,
install_github() now defaults todependencies = TRUE so you definitely get all the packagesyou need to build from source.
devtools supplies its own version ofsystem.file()so that when the function is called from the R console, it will havespecial behavior for packages loaded with devtools.
devtools supplies its own version ofhelp and?, which will search devtools-loaded packages as well asnormally-loaded packages.
check_devtools() no longer called bycheck() because the relevant functionality is now includedinR CMD CHECK and it was causing false positives(#446).
install_deps(TRUE) now includes packages listed inVignetteBuilder (#396)
build() no longer checks forpdflatexwhen building vignettes, as many modern vignettes don’t need it (#398).It also uses--no-build-vignettes for >3.0.0compatibility (#391).
release() does a better job of opening your emailclient if you’re inside of RStudio (#433).
check() now correctly reports the location of theR CMD check output when called with a customcheck_dir. (Thanks to
check_cran() records check times for each packagetested.
Improved defaultDESCRIPTION file created bycreate_description(). (Thanks to
Fixed bug ininstall_github() that preventedinstalling a pull request by supplyingrepo = "username/repo#pull". (#388)
explicitly specify user agent when querying user name and ref forpull request ininstall_github. (Thanks to Kirill Müller,#405)
install_github() now removes blank lines found in apackageDESCRIPTION file, protecting users from the vagueerror: contains a blank line error. (#394)
with_options() now works, instead of throwing anerror (Thanks to
Fixed bug inwd() whenpath wasomitted. (#374)
Fixed bug indev_help() that prevented it fromworking when not using RStudio.
source_gist() respects new github policy by sendinguser agent (hadley/devtools)
install_github() now takes repo names of the form[username/]repo[/subdir][@ref|#pull] - this is now therecommended form to specify username, subdir, ref and/or pull forinstall_github. (Thanks to Kirill Müller, #376)
install() now respects the global optionkeep.source.pkgs.
install() gains abuild_vignettes whichdefaults to TRUE, and ensures that vignettes are built even when doing alocal install. It does this by forcinglocal = FALSE if thepackage has vignettes, soR CMD build can follow the usualprocess. (#344)
install_github() now takes repo names of the formusername/repo - this is now the recommended form forinstall_github if your username is not hadley ;)
install_github() now adds details on the source ofthe installed package (e.g. repository, SHA1, etc.) to the packageDESCRIPTION file. (Thanks to JJ Allaire)
Adjustedinstall_version() to new meta datastructure on CRAN. (Thanks to Kornelius Rohmeyer)
Fixed bug so thatinstall_version() works withversion numbers that contain hyphens. (Thanks to KorneliusRohmeyer)
install_deps() is now exported, making it easier toinstall the dependencies of a package.
build(binary = TRUE) now no longer installs thepackage as a side-effect. (#335)
build_github_devtools() is a new function whichmakes it easy for Windows users to upgrade to the development version ofdevtools.
create_description() does a better job of combiningdefaults and user specified options. (#332)
install() also installs the dependencies that do nothave the required versions; besides, the argumentdependencies now works likeinstall.packages()(in previous versions, it was essentiallyc("Depends", "Imports", "LinkingTo")) (thanks, Yihui Xie,#355)
check() andcheck_cran() gain newcheck_dir argument to control where checking takes place(#337)
check_devtools() no longer incorrectly complainsabout avignettes/ directory
Decompression of zip files now respectsgetOption("unzip") (#326)
dev_help will now use the RStudio help pane, ifyou’re using a recent version of RStudio (#322)
Release is now a little bit smarter: if it’s a new package, it’llask you to read and agree to the CRAN policies; it will only ask aboutdependencies if it has any.
source_url() (andsource_gist()) acceptSHA1 prefixes.
source_gist() uses the GitHub API to reliably locatethe raw gist. Additionally it now only attempts to source files with.R or.r extensions, and gains aquiet argument. (#348)
Safer installation of source packages, which were previouslyextracted directly into the temp directory; this could be a problem ifdirectory names collide. Instead, source packages are now extracted intounique subdirectories.
The documentation for many devtools functions has beenconsiderably expanded, aiming to give the novice package developer morehints about what they should be doing and why.
load_all() now defaults toreset = TRUEso that changes to the NAMESPACE etc. are incorporated. This makes itslightly slower (but hopefully not noticeably so), and generally moreaccurate, and a better simulation of the install + restart + reloadcycle.
test() now looks in bothinst/test andtests/testthat for unit tests. It is recommended to usetests/testthat because it allows users to choose whether ornot to install test. If you move your tests frominst/teststotests/testthat, you’ll also need to changetests/test-all.R to runtest_check() insteadoftest_package(). This change requires testthat 0.8 whichwill be available on CRAN shortly.
New devtools guarantee: if because of a devtools bug, a CRANmaintainer yells at you, I’ll send you a hand-written apology note. Justforward me the email and your address.
Newinstall_local() function for installing localpackage files (as zip, tar, tgz, etc.) (Suggested by landroni)
parse_deps(), which parses R’s package dependencystrings, is now exported.
All package and user events (e.g. load, unload, attach anddetach) are now called in the correct place.
build() gainsargs parameter allowingyou to add additional arbitrary arguments, andcheck()gains similarbuild_args parameter.
install_git gainsgit_arg parameterallowing you to add arbitrary additional arguments.
Files are now loaded in a way that preserves srcreferences - thismeans that you will get much better locations on error messages, whichshould considerably aid debugging.
Fixed bug inbuild_vignettes() which prevented filesininst/doc from being updated
as.package() no longer uses the full path, whichshould make for nicer error messages.
More flexibility when installing package dependencies with thedependencies argument toinstall_*() (thanksto Martin Studer)
The deprecatedshow_rd() function has now beenremoved.
install_bitbucket() gainsauth_user andpassword params so that you can install from private repos(thanks to Brian Bolt)
Better git detection on windows (thanks to MikhailTitov)
Fix bug so thatdocument() will automatically createman/ directory
DefaultDESCRIPTION gainsLazyData: true
create_description() now checks that the directoryis probably a package by looking forR/,data/orsrc/ directories
Rolled back required R version from 3.0 to 2.15.
Add missing import fordigest()
Bump max compatible version of R with RTools 3.0, and add detailsfor RTools 3.1
install gains alocal option forinstalling the package from the local package directory, rather thanfrom a built tar.gz. This is now used by default for all packageinstallations. If you want to guarantee a clean build, runlocal = FALSE
install now uses optiondevtools.install.args for default installation arguments.This allows you to set any useful defaults(e.g. --no-multiarch) in your Rprofile.
install_git gainsbranch argument tospecify branch or tag (Fixes #255)
run_examples andtest gain afresh argument which forces them to run in a fresh Rsession. This completely insulates the examples/tests from your currentsession but means that interactive code (likebrowser())won’t work.(Fixes #258)
New functionseval_clean andevalq_clean make it easy to evaluate code in a clean Rsession.
clean_source loses thevanilla argument(which did not work) and gains aquiet argument
source_url andsource_gist now allowyou to specify a sha, so you can make sure that files you source fromthe internet don’t change without you knowing about it. (Fixes#259)
build_vignettes builds usingbuildVignette() and movies/copies outputs using the samealgorithm asR CMD build. This means thatbuild_vignettes() now exactly mimics R’s regular behaviour,including building non-Sweave vignettes (#277), building in the correctdirectory (#231), using make files (if present), and copying over extrafiles.
devtools now sets best practice compiler flags: fromcheck(),-Wall -pedantic and fromload_all(),-Wall -pedantic -g -O0 -UNDEBUG.These are prefixed to existing environment variables so that you canoverride them if desired. (Fixes #257)
If there’s noDESCRIPTION file present,load_all() will automatically create one usingcreate_description(). You can set options in your.Rprofile to control what it contains: seepackage?devtools for more details.
check() now also sets environment variable_R_CHECK_CODE_DATA_INTO_GLOBALENV_ to TRUE (to matchcurrent--as-cran behaviour) (Fixes #256)
Improved default email sent byrelease(),eliminatingcreate.post() boilerplate
revdep includes LinkingTo by default.
Fixed regular expression problem that caused RTools3.0.* to fail to be found on Windows.
load_data() got an overhaul and now respectsLazyData and correctly exports datasets by default (Fixes#242)
with_envvar gains the option to either replace,prefix or suffix existing environmental variables. The default is toreplace, which was the previous behaviour.
check_cran includessessionInfo() inthe summary output (Fixes #273)
create() gains acheck argument whichdefaults to FALSE.
with_env will be deprecated in 1.2 and removed in1.3
Whenload_all() calls.onAttach() and.onLoad(), it now passes the lib path to thosefunctions.
source_gist() has been updated to accept new gistURLs with username. (Fixes #247)
test() anddocument() now setenvironment variables, including NOT_CRAN.
Test packages have been renamed to avoid conflicts with existingpackages on CRAN. This bug prevented devtools 1.0 from passing check onCRAN for some platforms.
Catch additional case infind_rtools(): previouslyinstalled, but directory empty/deleted (Fixes #241)
Rcpp attributes are now automatically compiled duringbuild.
Packages listed in depends arerequire()d (Fixes#161, #178, #192)
load_all inserts a special version ofsystem.file into the package’s imports environment. Thistries to simulate the behavior ofbase::system.file butgives modified results because the directory structure of installedpackages and uninstalled source packages is different. (Fixes #179). Inother words,system.file should now just work even if thepackage is loaded with devtools.
Source files are only recompiled if they’ve changed since thelast run, and the recompile will be clean (--preclean) ifany exported header files have changed. (Closes #224)
The compilation process now performs a mock install instead ofusingR CMD SHLIB. This means thatMakevarsand makefiles will now be respected and generally there should be fewermismatches betweenload_all and the regular install andreload process.
S4 classes are correctly loaded and unloaded.
Rtools detection on windows has been substantially overhauled andshould both be more reliable, and when it fails give more informationabout what is wrong with your install.
If you don’t have rtools installed, devtools now automaticallysets the TAR environment variable to internal so you can still buildpackages.
check_cran now downloads packages fromcran.rstudio.com.
check() now makes the CRAN version check optional,and off by default. Therelease() function still checks theversion number against CRAN.
Incheck(), it is optional to require suggestedpackages, using theforce_suggests option.
Whencheck() is called, the new default behavior isto not delete existing .Rd files from man/. This behavior can be setwith the “devtools.cleandoc” option.
install_bitbucket() now always uses lowercase reponames. (Thanks to mnel)
New functionwith_lib(), which runs an expressioncode with a library path prepended to the existing libpaths. It differsslightly fromwith_libpaths(), which replaces the existinglibpaths.
New functioninstall_git() installs a packagedirectly from a git repository. (Thanks to David Coallier)
Ifpdflatex isn’t available, don’t try to buildvignettes withinstall() orcheck(). (Fixes#173)
install_github() now downloads from a new URL, toreflect changes on how files are hosted on GitHub.
build() now has avignettes option toturn off rebuilding vignettes.
install(quick=TRUE) now builds the package withoutrebuilding vignettes. (Fixes #167)
All R commands called fromdevtools now have theenvironment variableNOT_CRAN set, so that you can performtasks when you know your code is definitely not running on CRAN. (Closes#227)
Most devtools functions can a quiet argument that suppressesoutput. This is particularly useful for testing.
Fixed path issue when looking for Rtools on windows when registryentry is not present. (Fixes #201)
Reloading a package that requires a forced-unload of thenamespace now works.
When reloading a package that another loaded package depends on,if there was an error loading the code, devtools would print outsomething about an error inunloadNamespace, which wasconfusing. It now gives more useful errors.
An intermittent error inclear_topic_index relatedto usingrm() has been fixed. (Thanks to GregoryJefferis)
revdep() now lists “Suggests” packages, in additionto “Depends” and “Imports”.
revdep_check() now correctly passes therecursive argument torevdep().
The collection of check results at the end ofcheck_cran() previously did not remove existing results,but now it does.
When a package is loaded withload_all(), it nowpasses the name of the package to the.onLoad() function.(Thanks to Andrew Redd)
create function makes it easier to create a packageskeleton using devtools standards.
install_github() can now install from a pull request– it installs the branch referenced in the pull request.
install_github now acceptsauth_userandpassword arguments if you want to install a package ina private github repo. You only need to specifyauth_userif it’s not your package (i.e. it’s not yourusername)(Fixes #116)
newdev_help function replacesshow_rdand makes it easy to get help on any topic in a development package(i.e. a package loaded withload_all) (Fixes #110)
dev_example runs the examples for one in-developmentpackage. (Fixes #108)
build_vignettes now looks in modern location forvignettes (vignettes/) and warn if vignettes found in oldlocation (inst/doc). Building now occurs in a temporarydirectory (to avoid polluting the package with build artefacts) and onlyfinal pdf files are copied over.
newclean_vignettes function to remove pdfs ininst/doc that were built from vignettes invignettes/
load_all does a much better job at simulatingpackage loading (see LOADING section). It also compiles and loadsC/C++/Fortran code.
unload() is now an exported function, which unloadsa package, trying harder than justdetach. It now alsounloads DLLs. (Winston Chang. Fixes #119)
run_examples now has parametersshow,test,run to control which of\dontrun{},\dontshow{},\donttest{} and\testonly{} are commented out.Thestrict parameter has been removed since it is no longernecessary becauseload_all can respect namespaces. (Fixes#118)
build(),check(),install() etc now run R in--vanilla modewhich prevents it from reading any of your site or personalconfiguration files. This should prevent inconsistencies between theenvironment in which the package is run between your computer and othercomputers (e.g. the CRAN server) (Fixes #145)
All system R command now print the full command used to make iteasier to understand what’s going on.
as.package no longer uses~/.Rpackages.
as.package provides more informative error messageswhen path does not exist, isn’t a directory, or doesn’t contain aDESCRIPTION file.
New functioninst() takes the name of a package andreturns the installed path of that package. (Winston Chang. Fixes #130).This makes it possible to usedevtools functions(e.g. unload) with regular installed packages, not justin-development source packages.
New functiondevtest() returns paths to an internaltesting packages in devtools.
Development packages are now loaded into a namespace environment,
Packages listed in Imports and Depends are now loaded into animports environment, with name attribute “imports:xxxx”, which is theparent of the namespace environment. The imports environment is in turna child of the
The NAMESPACE file is now used for loading imports, instead ofthe DESCRIPTION file. Previously,load_all loaded allobjects from the packages listed in DESCRIPTION. Now it loads packages(and, when ‘importFrom’ is used, specific objects from packages) listedin NAMESPACE. This more closely simulates normal package loading. Itstill checks version numbers of packages listed in DESCRIPTION. (WinstonChang)
load_all can now be used to properly reloaddevtools. It does this by creating a copy of the devtools namespaceenvironment, and callingload_all from that environment.(Winston Chang)
The.onLoad and.onAttach functions fora development package are now both called when loading a package for thefirst time, or withreset=TRUE, and the order morecorrectly simulates normal package loading (create the namespace, call.onLoad, copy objects to the package environment, and thencall.onAttach). (Winston Chang)
load_all will now throw a warning if a dependencypackage does not satisfy the version requirement listed in DESCRIPTION.(Winston Chang. Fixes #109)
The package environment now has a ‘path’ attribute, similar to apackage loaded the normal way. (Winston Chang)
load_all now has an optionexport_all.When set to TRUE, only the objects listed as exports in NAMESPACE areexported. (Winston Chang)
load_all now compiles C files in the /src directory.(Winston Chang)
New functionscompile_dll() andclean_dll(), which compile C/C++/ Fortran source code, andclean up the compiled objects, respectively. (Winston Chang. Fixes#131)
load_code now properly skips missing files. (WinstonChang)
Add--no-resave-data to default buildcommand.
The subject line of the email created byrelease isnow “CRAN submission [package] [version]”, per CRAN repositorypolicy.
install_bitbucket properly installs zip files ofprojects stored in Mercurial repositories. (Winston Chang. Fixes#148)
build now builds vignettes becauseinstall does not. (Fixes #155)
New functionloaded_packages(), which returns thenames of packages that are loaded and attached.
Packages loaded withload_all now store devtoolsmetadata in their namespace environment, in a variable called.__DEVTOOLS__. This can be accessed with thedev_meta function. (Winston Chang. Fixes #128)
dev_mode now stores the path it uses in optiondev_path. That makes it easy for other applications todetect when it is on and to act accordingly.
New functionparse_ns_file(), which parses aNAMESPACE file for a package.
New functionparenvs(), which parents the parentenvironments of an object. (Winston Chang)
bump dependency to R 2.15
load_code now also looks for files ending in.q - this is not recommended, but is needed for some olderpackages
install_bitbucket installs R packages onbitbucket.
install now uses--with-keep.source tomake debugging a little easier.
All remote install functions give better error messages in thecase of http errors (Fixes #82).
install has new quick option to make packageinstallation faster, by sacrificing documentation, demos andmulti-architecture binaries. (Fixes #77)
install_url,install_github andinstall_gitorious gain a subdir argument which makes itpossible to install packages that are contained within a sub-directoryof a repository or compressed file. (Fixes #64)
with_debug function temporarily sets env vars sothat compilation is performed with the appropriate debugging flags set.Contributed by Andrew Redd.
revdep,revdep_maintainers andrevdep_check for calculating reverse dependencies, findingtheir maintainers and runningR CMD check. (Fixes#78)
check_cran has received a massive overhaul: it nowchecks multiple packages, installs dependencies (in user specifiedlibrary), and parse check output to extract errors and warnings
check uses new--as-cran option to makechecking as close to CRAN as possible (fixes #68)
devtools now uses optionsdevtools.path to set thedefault path to use with devmode, andgithub.user to setthe default user when installing packages from github.
if no package supplied, and no package has been worked withpreviously, all functions now will try the working directory. (Fixes#87)
on windows, devtools now looks in the registry to find whereRtools is installed, and does a better a job of locating gcc.(Contributed by Andrew Redd)
show_rd passes... on toRd2txt - this is useful if you’re checking how build time\Sexprs are generated.
A suite ofwith functions that allow you totemporarily alter the environment in which code is run:in_dir,with_collate,with_locale,with_options,with_path, … (Fixes #89)
release ask more questions and randomises correctanswers so you really need to read them (Fixes #79)
source_gist now accepts default url such as“https://gist.github.com/nnn”
New system path manipulation functions,get_path,set_path,add_path andon_path,contributed by Andrew Redd.
If you’re on windows,devtools now suppresses theunimportant warning from CYGWIN about the dos style file paths
decompress now uses target directory as defined inthe function call when expanding a compressed file. (Fixes #84)
document is always run in a C locale so thatNAMESPACE sort order is consistent acrossplatforms.
install now quoteslibpath and buildpath so paths with embedded spaces work (Fixes #73 and #76)
load_data now also loads.RData files(Fixes #81)
install now hasargs argument to passadditional command line arguments on toR CMD install(replaces... which didn’t actually do anything). (Fixes#69)
load_code does a better job of reconciling files inDESCRIPTION collate with files that actually exist in the R directory.(Fixes #14)
test function takesfilter argumentwhich allows you to restrict which tests are to be run
check runs with example timings, as is done on CRAN.Run with new paramcleanup = F to access thetimings.
missing_s3 function to help figure out if you’veforgotten to export any s3 methods
check_cran downloads and checks a CRAN package -this is useful to run as part of the testing process of your package ifyou want to check the dependencies of your package
strict mode forrun_examples which runseach example in a clean environment. This is much slower than thedefault (running in the current environment), but ensures that eachexample works standalone.
dev_mode now updates prompt to indicate that it’sactive (Thanks to Kohske Takahashi)
newsource_url function for sourcing script on aremote server via protocols other than http (e.g. https or ftp). (Thanksto Kohske Takahashi)
newsource_gist function to source R code stored ina github gist. (Thanks to Kohske Takahashi)
load_all now also loads all package dependencies(including suggestions) - this works around some bugs in the way thatdevtools attaches the development environment into the search path in away that fails to recreate what happens normally during packageloading.
remote installation will ensure the configure file isexecutable.
all external package installation functions are vectorised so youcan install multiple packages at time
newinstall_gitorious function install packages ingitorious repos.
newinstall_url function for installing package froman arbitrary url
includeinstall_version function from JeremyStephens for installing a specific version of a CRAN package from thearchive.
better check for OS type (thanks to Brian Ripley)
better default paths for 64-bit R on windows (Fixes #35)
check to see if Rtools is already available before trying to messwith the paths. (Fixes #55)
if an error occurs when calling loading R files, the cache willbe automatically cleared so that all files are loaded again next timeyou try (Fixes #55)
functions that run R now do so withR_LIBS set tothe current.libPaths() - this will ensure that checkinguses the development library if you are in development mode.R_ENVIRON_USER is set to an empty file to avoid yourexisting settings overriding this.
load_data (called byload_all) willalso load data defined in R files in the data directory. (Fixes#45)
dev_mode performs some basic tests to make sureyou’re not setting your development library to a directory that’s notalready an R library. (Fixes #25)
show_rd function that will show the developmentversion of a help file.external R commands always run in localeC, becausethat’s what the CRAN severs do.
clean_source sources an R script into a fresh Renvironment, ensuring that it can run independently of your currentworking environment. Optionally (vanilla = T), it willsource in a vanilla R environment which ignores all local environmentsettings.
On windows,devtools will also add the path tomingw on startup. (Thanks to pointer from DaveLovell)
newwd function to change the working directory to apackage subdirectory.
check_doc now checks package documentation as awhole, in the same way thatR CMD check does, rather thanlow-level syntax checking, which is done byroxygen2. DESCRIPTION checking has been moved intoload_all.check_rd`has been removed.
build is now exported, and defaults to building inthe package’s parent directory. It also gains a newbinaryparameter controls whether a binary or a source version (with novignettes or manuals) is built. Confusingly, binary packages are builtwithR CMD INSTALL.
build_win sends your package to the R windowsbuilder, allowing you to make a binary version of your package forwindows users if you’re using linux or macOS (if you’re using windowsalready, usebuild(binary = T))
if using.Rpackages config file, default function isused last, not first.
on Windows,devtools now checks for the presence ofRtools on startup, and will automatically add it to thepath if needed.
document usesroxygen2 instead ofroxygen. It now loads package dependency so that they’reavailable when roxygen executes the package source code.
document has new parameterclean whichclears all roxygen caches and removes all existing man files.check now runsdocument in this mode.
dev_mode will create directories recursively, andcomplain if it can’t create them. It should also work better onwindows.
install_github now allows you to specify whichbranch to download, and automatically reloads package ifneeded.
reload now will only reload if the package isalready loaded.
release gainscheck parameter thatallows you to skip package check (if you’ve just done it.)
test automatically reloads code so you never runtests on old code
newbash() function that starts bash shell inpackage directory. Useful if you want to use git etc.
removed inelegantupdate_src() since now supersededbybash()
fix bug in ftp upload that was adding extraneous space
build function builds package in specifieddirectory.install,check andrelease now all use this function.
build,install,check andrelease better about cleaning up after themselves - alwaystry to both work in session temporary directory and delete anyfiles/directories that they create
install_github now usesRCurl insteadof externalwget to retrieve package. This should make itmore robust wrt external dependencies.
load_all will skip missing files with a warning(thanks to suggestion from Jeff Laake)
check automatically deletes.Rcheckdirectory on successful completion
Quote the path to R so it works even if there are spaces in thepath.
Check for presence ofDESCRIPTION when loadingpackages to avoid false positives
install now works correctly withdevel_mode to install packages in your developmentlibrary
release prints news so you can more easily checkit
AllR CMD xxx functions now use the current R, notthe first R found on the system path.