Changelog
Source:NEWS.md
devtools 2.4.5
check(cleanup =)
was deprecated in devtools v1.11.0 (2016-04-12) and was made defunct in v2.4.4 (2022-07-20). The documentation is more clear now about recommended alternatives.check(check_dir = NULL)
is the new default, to align with 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. This only applies to R >= 4.2, due to favorable changes in the behaviour ofR CMD check --as-cran
(#2459).test_active_file()
passes the package onto to testthat so it can correctly set theTESTTHAT_PKG
envvar (#2470).test()
andtest_active_file()
once again work with testthat itself.
devtools 2.4.4
CRAN release: 2022-07-20
install(reload = TRUE)
now callspkgload::unregister()
instead ofpkload::unload()
(#2349). This allows the package to keep functioning if it is still in use in the R session (e.g. through event handlers).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 package development (#2388).
dev_sitrep()
has been updated for the calendar-based version number scheme adopted by the RStudio IDE in September 2021 (#2397, #2410).
devtools 2.4.3
CRAN release: 2021-11-30
New
check_mac_release()
function to check a package using the macOS builder at https://mac.r-project.org/macbuilder/submit.html (#2375)Jenny Bryan is now the official maintainer.
release()
andsubmit_cran()
now record submission details using the Debian Control File format, for better machine-readability. This file has a new name, CRAN-SUBMISSION (instead of CRAN-RELEASE) and now includes package version, in addition to the full SHA and a timestamp.
devtools 2.4.2
CRAN release: 2021-06-07
check_man()
now works with R versions 4.1+ (#2354)test_active_file()
now again works on windows projects stored under the user’s home directory (~
) (#2355)document(quiet = TRUE)
now works without failure on windows (#2351)Minor test failure on R 4.2 has been fixed.
New Rstudio addin for
run_examples()
(#2358)
devtools 2.4.1
CRAN release: 2021-05-05
build_readme()
now uses thepath
argument, as designed (#2344)create()
no longer opens projects by default to avoid duplicate projects opened by the RStudio IDE project template (#2347, @malcolmbarrett)The RStudio addins now use
test_active_file()
andtest_coverage_active_file()
instead of the deprecatedtest_file()
andtest_coverage_file()
(#2339)RStudio addins now run in interactive mode, rather than background mode (@jennybc, #2350)
install(upgrade)
now defaults to ‘default’ rather than ‘ask’. This allows you to control the default asking behavior with theR_REMOTES_UPGRADE
environment variable (#2345)
devtools 2.4.0
CRAN release: 2021-04-07
Breaking changes and deprecated functions
The
check_results()
function has been removed. It was not used by any CRAN package, and much better alternatives are available in the rcmdcheck package.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 a name collision withtestthat::test_file()
. The previous names have been soft deprecated in this release, they will be hard deprecated in the next release and eventually removed. (#2125)
Re-licensing
- devtools is now released under a MIT license (#2326)
Minor improvements and fixes
build_readme()
now supports readme files located ininst/README.Rmd
, as intended (#2333)build_vignettes()
now creates more specific.gitignore
entries (@klmr, #2317)check()
now only re-documents if you have a matching version of roxygen2 (#2263).change_maintainer_email()
now has a check to assess whether the email is actually changed. If the email is not changed, the code now stops such that an email is not accidentally sent to the wrong recipient. (@emilsjoerup, #2073)run_examples(fresh = TRUE)
again works without error (#2264)The covr and DT packages have been moved from Imports to Suggests. They are only needed when running
test_coverage()
andtest_coverage_active_file()
so now you’ll be prompted to install them when needed.Switched to fs for all file system functions (#2331, @malcolmbarrett)
Now uses testthat 3.0.0 to power
test()
,test_active_file()
,test_coverage()
, andtest_coverage_active_file()
. The major difference is thattest_active_file()
now generates a compact summary that takes up less space on the console.
devtools 2.3.1
CRAN release: 2020-07-21
check_win_*()
function now resets the email to the original 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 functions
dr_devtools()
anddr_github()
have been removed.Documentation has been synced with remotes 2.2.0
devtools 2.3.0
CRAN release: 2020-04-10
build()
now errors with a more informative error message when passed an invalidpkg
. (#2177)New
build_rmd()
can build any.Rmd
file in a clean session.dev_sitrep()
now works correctly when R is out of date (#2204)
devtools 2.2.2
CRAN release: 2020-02-17
install_dev_deps()
now passes formal args ontoremotes::install_deps()
(@t-gibson, #2166)spell_check()
now checks ifspelling
is installed and prompts users to install it if not (@mikemahoney218, #2172)submit_cran()
now returns a more informative error when the CRAN submission portal is down (#1958)check()
gains avignettes
argument, to more easily disable checks for vignettes (#2165).check_win_*()
function now resets the email to the original email after execution (@muschellij2, #2152).check()
now setsNOT_CRAN=true
by default, as was originally intended (#2135).install_deps()
now supportsoptions("devtools.ellipsis_action")
as well (#2169)test()
now takesstop_on_failure
as a formal argument (FALSE by default) instead of in...
. Its value is still passed totestthat::test_dir
as before (@infotroph, #2129).test()
andtest_coverage_file()
gain aexport_all
argument, which controls if all functions in a package are automatically exported (#1201).dev_sitrep()
now works if run outside a package directory (#2127).release()
now works if the package root is not in the working directory.
devtools 2.2.1
CRAN release: 2019-09-24
test()
now sets the collation order toC
before running, which matches the behavior of tests when run withR CMD check
(#2121)-
New
options("devtools.ellipsis_action")
option added to control the action of ellipsis in devtools. This should be one of-
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 Usingrlang::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. The default behavior was also changed to issue a warning rather than an error if any arguments are unused, as there are some cases where devtools does not need to install the package, so unused arguments are false positives (#2109).
-
install()
now throws an error when it fails, as intended (#2120)install()
now again reloads and re-attaches packages if they were previously loaded (#2111).release()
no longer calls the deprecateddr_devtools()
(#2105)test()
now explicitly passesstop_on_failure = FALSE
totestthat::test_dir()
(@jameslamb, #2099)
devtools 2.2.0
CRAN release: 2019-09-07
New Features
create()
added back, the RStudio IDE usescreate()
in the create packages dialog, so removing it in version 2.1.0 broke old versions of the IDE.New
dev_sitrep()
function to return information about your development environment and diagnose common problems. The former functionsdr_devtools()
anddr_github()
have been deprecated. (#1970)All functions taking
...
now use the ellipsis package. This catches errors when arguments are misspelled or incorrectly specified (#2016)
Minor improvements and fixes
build_vignettes()
now correctly installs the vignette builder if it is not already installed (#2089).dev_sitrep()
now uses the same endpoint to detect the current RStudio version as the IDE (#2050).document()
gains aquiet
parameter, to silence output andcheck()
now passes its quiet argument to it (#1986).Add the DT package as a dependency, so that
test_coverage()
andtest_coverage_file()
work without having to install additional packages (#2085).check_man()
now succeeds whentools::undoc()
returns empty results (#1944).check_win_*()
functions gain aemail
argument, so temporarily change the email the check results will be sent to (#1723).install()
now explicitly unloads packages before trying to install a new version (#2094).All
install_*()
functions now attach build tools to the PATH, which makes them work on Windows when RTools is not on the default PATH (#2093).test_coverage_file()
now works when there is not a 1 to 1 correspondence between test and source files (#2011).release()
now works again whenpkg
is not 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 old versions of the IDE.In several places
http:
URLs were used instead ofhttps:
, the most critical being in thecran_mirror
,cran_pacakges
, andcran_submission_url
values which could have enabled discrete 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)
devtools 2.1.0
CRAN release: 2019-07-06
New Features
-
testthat
androxygen2
are now added toImports
rather thanSuggests
, so they are automatically installed when you install devtools.
Deprecated functions now removed
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 been removed after being deprecated in previous releases. Use the versions in the usethis package directly.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 is recommended to use the revdepcheck package instead.system_check()
,system_output()
have been removed after being deprecated in previous releases. It is recommend to use the processx package instead.build_win()
has been removed, after being deprecated in previous releases.yesno()
as used inrelease()
now has clearer synonyms for “yes” (@mattmalin, #1993)
Minor improvements and fixes
check_rhub
gains a new argumentbuild_args
for arguments passed toR CMD build
....
is now passed torhub::check_for_cran()
(@gaborcsardi, @maelle, #2041)build_manual()
now fails if the manual fails to build. (#2056)test_file()
andtest_coverage_file()
now work with C and C++ files in the src/ directory as well.
devtools 2.0.2
CRAN release: 2019-04-08
Two tests are now skipped when run on CRAN, as they fail due to an outdated pandoc and restrictions on writing to the package library respectively.
load_all()
now accepts ‘package’ objects, regaining previous behavior in devtools prior to 2.0.0 (#1923)test()
,test_coverage()
andtest_coverage_file()
now set theTESTTHAT_PKG
environment variable, so it is more consistent with running the tests duringR CMD check
(testthat#787).check()
now replaces existing environment variables rather than appending them (#1914).
devtools 2.0.1
CRAN release: 2018-10-26
This is a minor release mainly fixing bugs which snuck through in the devtools 2.0.0 release.
install()
now correctly passes theupgrade
parameter toremotes::install_deps()
(@Paxanator, #1898).install_deps()
now again works from any directory within a package (#1905)Add a RStudio addin for
test_coverage()
.All tests which use remote resources are now skipped on CRAN, to avoid spurious failures
devtools 2.0.0
CRAN release: 2018-10-19
Devtools 2.0.0 is a major release that contains work from the past year and a half, since the major devtools release (1.13.0).
This release splits the functionality in devtools into a number of smaller packages which are simpler to develop and also easier for other packages to depend on. In particular the following packages have been spun off in what we are calling the ‘conscious uncoupling’ of devtools.
- remotes: Installing packages (i.e.
install_github()
). - pkgbuild: Building binary packages (including checking if build tools are available) (i.e.
build()
). - pkgload: Simulating package loading (i.e.
load_all()
). - rcmdcheck: Running R CMD check and reporting the results (i.e.
check()
). - revdepcheck: Running R CMD check on all reverse dependencies, and figuring out what’s changed since the last CRAN release (i.e.
revdep_check()
). - sessioninfo: R session info (i.e.
session_info()
). - usethis: Automating package setup (i.e.
use_test()
).
devtools will remain the main package developers will interact with when writing R packages; it will just rely on these other packages internally for most of the functionality.
Breaking changes
There have been a number of breaking changes in this release, while this will cause some short term pain for users it will result in a easier to understand API in the future, so we feel the tradeoff is worthwhile.
-
devtools::install()
arguments have been changed as follows.-
local
->build
-
force_deps
->force
-
upgrade_dependencies
->upgrade
-
threads
-> Removed, but you can useNcpus
, which is passed by...
toinstall.packages()
-
metadata
-> Removed -
out_dir
-> Removed -
skip_if_log_exists
-> Removed
-
check()
argumentcheck_version
has been renamed toremote
to better describe what tests are disabled (#1811)get_path()
,set_path()
,add_path()
andon_path()
have been removed, this functionality is available withwithr::with_path()
(#1796).The
lang
argument tospell_check()
was removed, for compatibility with spelling v1.1. (#1715)The previously deprecated
with_
functions have now been removed. The functionality has been moved to the withr package.RCMD()
,clean_source()
,eval_clean()
andevalq_clean()
have been removed. These functions never worked terribly well, and have been replaced by the much better functions in callr.build_win()
has been renamed tocheck_win_release()
,check_win_devel()
, andcheck_win_oldrelease()
(#1598).
Deprecated functions
Infrastructure functions (
use_*
) now use the implementations in usethis and the versions in devtools are deprecated. If you use these from a package you should switch your package to depend on usethis directly instead.The
revdep_check_*
functions have been deprecated in favor of the revdepcheck package.system_check()
andsystem_output()
have been deprecated in factor of the processx package.
Major changes
All
install_*()
functions are now re-exported from remotes rather than being defined in devtoolsdevtools now depends on roxygen2 6.1.0: this considerably simplifies
devtools::document()
and makes it more consistent withroxygen2::roxygenise()
.test_file()
function added to test one or more files from a package (#1755).test_coverage()
function added to provide a helper to compute test coverage using covr (#1628).test_file()
andtest_coverage_file()
now have RStudio addins (#1650)test_file_coverage()
function added to show the test coverage of one or more files from a package. (#1755).session_info()
now uses the implementation in the sessioninfo package. Packages usingdevtools::session_info()
are encouraged to switch to usingsessioninfo::session_info()
instead.package_info()
function now re-exported from the sessioninfo package.check()
now uses rcmdcheck to run and parse R CMD check output (#1153).-
Code related to simulating package loading has been pulled out into a separate package, pkgload. The following functions 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 internal use.load_all()
andunload()
have been moved to pkgload, but devtools provides shims since these are commonly used. find_rtools()
,setup_rtools()
,has_devel()
,compiler_flags()
,build()
andwith_debug()
have moved to the new pkgbuild package.build()
andwith_debug()
are re-exported by devtoolsThe
spell_check()
code has been moved into the new spelling package and has thereby gained support for vignettes and package wordlists. The devtools function now wrapsspelling::spell_check_package()
.
Minor improvements and fixes
check_win_*()
now build the package withmanual = TRUE
by default (#1890).check()
output now works more nicely with recent changes to rcmdcheck (#1874).reload()
now reloads loaded but not attached packages as well as attached ones.Executed
styler::style_pkg()
to update code style (#1851, @amundsenjunior).save_all()
helper function wrapsrstudioapi::documentSaveAll()
calls (#1850, @amundsenjunior).update_packages()
better documented to advertise it can be used to update packages installed by any of theinstall_*
functions.check()
gains aincoming
option to toggle the CRAN incoming checks.build_vignette()
gains akeep_md
option to allow keeping the intermediate markdown output (#1726)remote_sha.github()
now correctly looks up SHA in private repositories (#1827, @renozao).devtools
use_*()
functions now temporarily set the active usethis project if given a pkg argument that is not the current directory. This provides backwards compatibility with previous behavior (#1823).Vignettes are now built in a separate process, and the package is installed before building the vignettes (#1822)
build_readme()
added to build the README.md from a README.Rmd (#1762)build_vignettes()
now has aclean
andupgrade
arguments, to control cleaning of intermediate files and upgrading vignette dependencies respectively. (#1770).release()
gains an additional question ensuring you updated codemeta.json if one exists (#1774, #1754)test()
now setsuseFancyQuotes = FALSE
to 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 on windows (#1765)Fix skipping when installing from a full SHA (#1624)
add
pkgdown::build_site()
wrapper (@kiwiroy, #1777)add pkgdown site (https://devtools.r-lib.org) (#1779, @jayhesselberth)
install_version()
can now install current version of CRAN package on Windows and macOS (@jdblischak, #1730)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 error on 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 the former option (#1271, #1276, #1702).Now use cli package to draw rules - they are more aesthetically pleasing and the correct width in the RStudio build pane (#1627).
release()
has been tweaked to reflect modern submission workflow and to ask questions rather than running code for you (#1632).document()
,load_all()
,check()
,build()
andtest()
now automatically save open files when they are run inside the RStudio IDE. (#1576)New
check_rhub()
function to check packages using https://builder.r-hub.io/.run_examples
was mistakenly passingshow
topkgload::run_example
, causing it to fail (@amcdavid, #1449)New
build_manual()
function that produces pdf manual for the package (@twolodzko, #1238).If you use git
release()
now generates a file calledCRAN-RELEASE
that reminds you to tag the commit that you submitted to CRAN (#1198).release()
once again looks for additional release questions in the correct environment (#1434).submit_cran()
now checks that you’re ready to submit, 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, @ianmcook).
build_vignettes()
gains a quiet argument (#1543).source_gist()
works once more when there is only a single file in the gist (#1266).In order to not run test helpers in
document()
, thehelpers
argument ofload_all()
is set toFALSE
(@nbenn, #1669)The
my_unzip()
function is now able to use theutils::unzip
fallback when R is compiled from source with no unzip package present (@theGreatWhiteShark, #1678)If the foghorn package is installed,
release()
displays the results of the CRAN checks (#1672, @fmichonneau).
devtools 1.13.5
CRAN release: 2018-02-18
- Fix two test errors related to GitHub rate limiting and mocking base functions.
devtools 1.13.3
CRAN release: 2017-08-02
- Workaround a change in how Rcpp::compileAttributes stores the symbol names that broke tests.
devtools 1.13.2
CRAN release: 2017-06-02
- Workaround a regression in Rcpp::compileAttributes. Add trimws implementation for R 3.1 support.
devtools 1.13.1
CRAN release: 2017-05-13
Bugfix for installing from git remote and not passing git2r credentials (@james-atkins, #1498)
Bugfix for installation of dependencies of dependencies (@jimhester, #1409).
Bugfix for installation of dependencies in CRAN-like repositories such as those created by drat (@jimhester, #1243, #1339).
load_all()
no longer automatically creates a description for you.use_test()
template no longer includes useless comments (#1349)Fix
test()
compatibility with testthat versions 1.0.2 (#1503).Fix
install_version()
,install_bitbucket()
,install_local()
,install_url()
,install_svn()
,install_bioc()
gainquiet
arguments and properly pass them to internal functions. (#1502)
devtools 1.13.0
CRAN release: 2017-05-08
New Features
spell_check
gains adict
argument to set a custom language or dictionaryrelease()
now checks documentation for spelling errors by default.New
use_gpl3_license()
sets the license field inDESCRIPTION
and includes a copy of the license inLICENSE
.
Revdep check improvements
Various minor improvements around checking of reverse dependencies (#1284, @krlmlr). All packages involved are listed at the start, the whole process is now more resilient against package installation failures.
revdep_check()
andrevdep_check_resume()
gain a skip argument which takes a character 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 check as 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, @krlmlr).Package names and examples are sorted in case-insensitive C collation (#1322, @krlmlr).
use_revdep()
adds.gitignore
entry for check database (#1321, @krlmlr).Own package is installed in temporary library for revdep checking (#1338, @krlmlr).
Automated revdep check e-mails now can use the new
my_version
andyou_cant_install
variables. The e-mail template has been updated to use these variables (#1285, @krlmlr).Installation failures are logged during revdep checking, by default in
revdep/install
. Once an installation has failed, it is not attempted a second time (#1300, @krlmlr).Print summary table in README.md and problems.md (#1284, @krlmlr).
Revdep check improvements (#1284)
Bug fixes and minor improvements
Handle case of un-installed package being passed to session_info (#1281).
Using authentication to access Github package name. (#1262, @eriknil).
spell_check()
checks for hunspell before running (#1475, @jimvine).add_desc_package()
checks for package dependencies correctly (#1463, @thomasp85).Remove deprecated
args
argument frominstall_git()
to allow passthrough toinstall
(#1373, @ReportMort).added a
quiet
argument toinstall_bitbucket()
, with a default value ofFALSE
(fixes issue #1345, @plantarum).update_packages()
allows for override of interactive prompt (#1260, @pkq).use_test()
template no longer includes useless comments (#1349)Add encoding support in
test_dir()
call by adding reference to pkg$encoding (#1306, @hansharhoff)Parse valid Git remote URLs that lack trailing
.git
, e.g. GitHub browser URLs (#1253, @jennybc).Add a
check_bioconductor()
internal function to automatically install BiocInstaller() if it is not installed and the user wants to do so.Improve Git integration.
use_git_ignore()
anduse_git_config()
gainquiet
argument, tests work without settinguser.name
anduser.email
Git configuration settings (#1320, @krlmlr).Improve Git status checks used in
release()
(#1205, @krlmlr).Improved handling of local
file://
repositories ininstall()
(#1284, @krlmlr).setup()
andcreate()
gain newquiet
argument (#1284, @krlmlr).Avoid unnecessary query of
available_packages()
(#1269, @krlmlr).Fix AppVeyor test by manually installing
curl
(#1301).install(dependencies = FALSE)
doesn’t query the available packages anymore (@krlmlr, #1269).use_travis()
now opens a webpage in your browser to more easily activate a repo.use_readme_rmd()
anduse_readme()
share a common template with sections for package overview, GitHub installation (if applicable), and an example (@jennybc, #1287).Fix auto download method selection for
install_github()
on R 3.1 which lacks “libcurl” incapabilities()
. (@kiwiroy, #1244)Fix removal of vignette files by not trying to remove files twice anymore (#1291)
add timestamp to messages in
build_win()
(@achubaty, #1367).
devtools 1.12.0
CRAN release: 2016-06-24
New features
New
install_bioc()
function and bioc remote to install Bioconductor packages from their SVN repository.install_dev_deps()
gets everything you need to start development on source package - it installs all dependencies, and roxygen2 (#1193).use_dev_version()
automates the process of switching from a release version number by tweaking theDESCRIPTION
, adding a heading toNEWS.md
(if present), and checking into git (if you use it) (#1076.)use_github()
accepts a host argument, similar toinstall_github()
(@ijlyttle, #1101)
Bug fixes and minor improvements
Update with Rtools-3.4 information, (@jimhester)
devtools now uses https to access the RStudio CRAN mirror if it will work on your system (#1059)
Handle case when a GitHub request returns a non-JSON error response. (@jimhester, #1204, #1211)
Suggested packages, including those specified as
Remotes:
are now installed after package installation. This allows you to use circularRemotes:
dependencies for two related packages as long as one of the dependencies is a Suggested package. (@jimhester, #1184, hadley/dplyr#1809)bug fix for installation of binary packages on windows, they must be installed directly from a zip file. (@jimhester, #1191, #1192)
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 and now operates recursively. (@jimhester, #1175, #1159, #1161)check_man()
now prints a message if no problems are found (#1187).install_*
functions andupdate_packages()
refactored to allow updating of packages installed using any of the install methods. (@jimhester, #1067)install_github()
now useshttps://api.github.com
as the host argument, so users can specify ‘http:’ or other protocols if needed. (@jimhester, #1131, #1200)load_all()
runs package hooks before sourcing test helper files allowing test helper to make use of objects created when a package is loaded or attached. (@imanuelcostigan, #1146)revdep_check()
will now create therevdep/
directory if it does not already exist (#1178).source_gist()
gains afilename
argument to specify a particular file to source from a GitHub gist. (@ateucher, #1172)Add a default codecov.yml file to turn off commenting with
use_coverage()
(@jimhester, #1188)Bug fix for ‘nchar(text) : invalid multibyte string’ errors when running
write_dcf()
on DESCRIPTION files with non-ASCII encodings (#1224, @jimhester).
devtools 1.11.1
CRAN release: 2016-04-21
- Bug fix in
search_path_for_rtools()
using the gcc-4.9.3 toolchain when there is no rtools setting in the windows registry. (@jimhester, #1155)
devtools 1.11.0
CRAN release: 2016-04-12
Infrastructure helpers
create_description()
now setsEncoding: UTF-8
. This helps non-English package authors (#1123).All
use_
function have been overhauled to be more consistent, particularly around notification. Most functions now also ask to overwrite if a file already exists (#1074).use_coverage()
now adds covr to “Suggests”, rather than recommending you install it explicitly in.travis.yml
.use_github()
now confirms that you’ve picked a good title and description (#1092) and prints the url of the repo (#1063).use_news()
, anduse_test()
open the files in RStudio (if you’re using it and have the rstudioapi package installed).use_testthat()
tells you what it’s doing (#1056).use_travis()
generates a template compatible with the newest R-travis.use_readme_md()
creates a basicREADME.md
template (#1064).use_revdep()
has an updated template for the new revdep check system (#1090, @krlmlr).Removed the deprecated
use_coveralls()
,add_rstudio_project()
,add_test_infrastructure()
, andadd_travis()
.Deprecated
build_github_devtools()
has been removed.
Checks and release()
check()
now always succeeds (instead of throwing an error 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. This defaults toFALSE
, butrelease()
runs check with it set toTRUE
(#1071; #1087, @krlmlr).The
cleanup
argument tocheck()
is deprecated: it now always returns the path to the check directory.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 of the questions, and to ensure that you’re ok with problems. It warns if bothinst/NEWS.Rd
andNEWS.md
exist (@krlmlr, #1135), doesn’t throw error if Git head is detached (@krlmlr, #1136).release()
gains anargs
argument to control build options, e.g. to allow passingargs = "--compact-vignettes=both"
for packages with heavy PDF vignettes (@krlmlr, #1077).system_check()
gains new argumentspath
to controls the working directory of the command, andthrow
to control whether or not it throws an error on command failure.env
has been renamed to the more explicitenv_vars
.
Revdep checks
revdep_check()
has been overhauled. All revdep_
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 as check/check.rds
, and the other revdep()
functions read from that cache. This also allows you to resume a partial run with revdep_check_resume()
. This should be a big time saver if something goes unexpected wrong in the middle of the checks. You can blow away the cache and start afresh with revdep_check_reset()
.
revdep_check_save_summary()
now creates README.md
to save one level of clicking in github. It also creates a problems.md
that contains only results for only packages that had warnings or errors. Each problem is limited to at most 25 lines of output - this avoids lengthy output for failing examples. revdep_check_print_problems()
prints a bulleted list of problems, suitable for inclusion in your cran-comments.md
.
Summary results are reported as they come in, every then messages you’ll get a message giving elapsed and estimated remaining time.
An experimental revdep_email()
emails individual maintainers with their R 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, @krlmlr).Package index caches for
revdep_check()
now time out after 30 minutes.revdep_check_save_logs()
has been removed - it is just not that useful.revdep_check_summary()
has been removed - it never should have been part of the exported API.
Other improvements
Devtools now uses new gcc toolchain on windows, if installed (@jimhester).
install_git()
now allows you to pass credentials to git2r to specify specific ssh credentials (@onlymee, #982)load_all()
now sources all test helpers if you use testthat. This makes it much easier to interactively run tests (#1125).load_all()
also correctly handlesunix
andwindows
subdirectories withinR
(@gaborcsardi, #1102)build_win()
defaults to only R-devel, since this is most commonly what you want.Help shims now inform you that you’re using development documentation (#1049).
git_sha1()
Fix fetching the latest git commit so that it also works for shallow git clones, i.e. git clones which make use of depth. (#1048, #1046, @nparley)
devtools 1.10.0
CRAN release: 2016-01-23
New features
curl
,evaluate
,roxygen2
andrversions
have been moved from Imports to Suggests to lighten the dependency load of devtools. If you run a function that needs one of the packages, you’ll prompted to install it (#962, @jimhester).Devtools uses a new strategy for detecting RTools on windows: it now only looks for Rtools if you need to
load_all()
orbuild()
a package with compiled code. This should make it easier 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. the directory that containsDESCRIPTION
) (#985).use_news_md()
adds a basicNEWS.md
template (#957).use_mit_license()
writes the necessary infrastructure to declare and release an R package under the MIT license in a CRAN-compliant way. (#995, @kevinushey)check(cran = TRUE)
adds--run-donttest
since you do need to test code in\dontest()
for CRAN submission (#1002).
Package installation
install()
installs packages specified in theAdditional_repositories
field, such as drat repositories. (#907, #1028, @jimhester). It correctly installs missing dependencies (#1013, @gaborcsardi). If called on a Bioconductor package, include the Bioconductor repositories if they are not already set (#895, @jimhester).install()
gains ametadata
argument which lets you add extra fields to theDESCRIPTION
on install. (#1027, @rmflight)install_github()
andinstall_git()
only downloads and installs the package if the remote SHA1 reference differs from the currently installed reference (#903, @jimhester).install_local()
captures git and github information and stores it in theDESCRIPTION
(#1027, @rmflight).install_version()
is more robust when handling multiple repos (#943, #1030, @jimhester).Bugfix for
Remotes:
feature that prevented it from working if devtools was not attached as is done in travis-r (#936, @jimhester).
Bug fixes and minor improvements
check_dev_versions()
checks only package dependencies (#983).check_man()
replacescheck_doc()
(since most other functions are named after the corresponding directory).check_doc()
will hang around as an alias for the forseeable future (#958).create()
produces a dummy namespace will fake comment so roxygen2 will overwrite silently (#1016).create()
andsetup()
are more permissive – they now accept a path to either a new directory or empty directory. (#966, @kevinushey)document()
now only runsupdate_collate()
once.load_all()
resolves a longstanding lazy load database corruption issue when reloading packages which define S3 methods on generics from base or other packages (#1001, @jimhester).-
release_checks()
gains two new checks: -
revdep_check()
:More verbose about which package is installed (#926, @krlmlr)
Verifies the integrity of already downloaded package archives (#930, @krlmlr)
Is now more tolerant of errors when retrieving the summary for a checked package (#929, @krlmlr).
When
ncpus > 1
, it includes the package name for when so you know which package has failed and can start looking at the output without needing to wait for all packages to finish (@mattdowle).Uses proper repository when
BiocInstaller::useDevel(TRUE)
(#937, @jimhester).
Shimmed
system.file()
now respectsmustWork = TRUE
and throws an error if the file does not exist (#1034).use_appveyor()
template now createsfailure.zip
artifact instead of polluting the logs withR CMD check
output (#1017, @krlmlr, @HenrikBengtsson).use_cran_comments()
template has been improved (#1038).use_data()
now warns when trying to save the same object twice, and stops if there is no object to save (#948, @krlmlr).use_revdep_check()
no longer includesrevdep_check_save_logs
in default template. I found I never used the logs and they just cluttered up the package directory (#1003).with_*()
functions have moved into the withr package, and devtools functions have been deprecated (#925, @jimhester).
devtools 1.9.1
CRAN release: 2015-09-11
Avoid importing heavy dependencies to speed up loading (#830, @krlmlr).
Remove explicit
library(testthat)
call intest()
(#798, @krlmlr).as.package()
andload_all()
gain new argumentcreate
. 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, @krlmlr).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 at maintainer address in interactive mode (#800, @krlmlr).check()
now uses a better strategy whencran = TRUE
. Instead of attempting to simulate--as-cran
behaviour by turning on certain env vars, it now uses--as-cran
and turns off problematic checks with env vars (#866). The problematiccran_env_vars()
function has been removed.find_rtools()
now looks for registry keys in both HKCU (user) and HKLM (admin) locations (@Kevin-Jin, #844)install()
can now install dependencies from remote repositories by specifying them asRemotes
in theDESCRIPTION
file (#902, @jimhester). Seevignette("dependencies")
for more details.install_*()
detects if called on a Bioconductor package and if so, automatically includes the Bioconductor repositories if needed (#895, @jimhester).install_deps()
now automatically upgrades out of date dependencies. This is typically what you want when you’re working on a development version of a package. To suppress this behaviour, setupgrade_dependencies = FALSE
(#863).install_deps()
is more careful with...
- this means additional arguments toinstall_*
are more likely to work (#870).install_gitorious()
has been removed since gitorious no longer exists (#913).load_all()
no longer fails if auseDynLib()
entry in the NAMESPACE is incorrect. This should make it easy to recover from an incorrect@useDynLib
, because re-documenting() should now succeed.release()
works for packages not located at root of git repository (#845, #846, @mbjones).revdep_check()
now installs suggested packages by default (#808), and setsNOT_CRAN
env var tofalse
(#809). This makes testing more similar to CRAN so that more packages should pass cleanly. It also setsRGL_USE_NULL
totrue
to stop rgl windows from popping up during testing (#897). It also downloads all source packages at the beginning - this makes life a bit easier if you’re on a flaky internet connection (#906).New
uninstall()
removes installed package (#820, @krlmlr).Add
use_coverage()
function to add codecov.io or coveralls.io to a project, deprecateuse_coveralls()
(@jimhester, #822, #818).use_cran_badge()
uses canonical url form preferred by CRAN.use_data()
also works with data from the parent frame (#829, @krlmlr).use_git_hook()
now creates.git/hooks
if needed (#888)GitHub integration extended:
use_github()
gains aprotocol
argument (ssh or https), populates URL and BugReports fields of DESCRIPTION (only if non-existent or empty), pushes to 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, @jennybc).use_travis()
: Default travis script leaves notifications on default settings.uses_testthat()
andcheck_failures()
are now exported (#824, #839, @krlmlr).use_readme_rmd()
usesuses_git()
correctly (#793).with_debug()
now useswith_makevars()
rather thanwith_env()
, because R reads compilation variables from the Makevars rather than the environment (@jimhester, #788).Properly reset library path after
with_lib()
(#836, @krlmlr).remove_s4classes()
performs a topological sort of the classes (#848, #849, @famuvie).load_all()
warns (instead of failing) if importing symbols, methods, or classes fromNAMESPACE
fails (@krlmlr, #921).
devtools 1.8.0
CRAN release: 2015-05-09
Helpers
New
dr_devtools()
runs some common diagnostics: are you using the latest version of R and devtools? It is run automatically byrelease()
(#592).use_code_of_conduct()
adds a contributor code of conduct from http://contributor-covenant.org. (#729)use_coveralls()
allows you to easily add test coverage with coveralls (@jimhester, #680, #681).use_git()
sets up a package to use git, initialising the repo and checking the existing files.New
use_cran_badge()
adds a CRAN status badge that you can copy into a README file. Green indicates package is on CRAN. Packages not yet submitted or accepted to CRAN get a red badge.
Package installation and info
build_vignettes()
automatically installs the VignetteBuilder package, if necessary (#736).install()
andinstall_deps()
gain a...
argument, so additional arguments can be passed toutils::install.packages()
(@jimhester, #712).install_svn()
optionally accepts a revision (@lev-kuznetsov, #739).install_version()
now knows how to look in multiple repos (#721).package_deps()
(anddev_package_deps()
) determines all recursive dependencies and whether or not they’re up-to-date (#663). Useupdate(package_deps("xyz"))
to update out of date dependencies. This code is used ininstall_deps()
andrevdep_check()
- it’s slightly more aggressive than previous code (i.e. it forces you to use the latest version), which should avoid problems when you go to submit to CRAN.New
update_packages()
will install a package (and its dependencies) only if they are missing or out of date (#675).session_info()
can now take a vector of package names, in which case it will print the version of those packages and their dependencies (#664).
Git and github
Devtools now uses the git2r package to inspect git properties and install remote git packages with
install_git()
. This should be considerably more reliable than the previous strategy which involves calling the command linegit
client. It has two small downsides:install_git()
no longer accepts additionalargs
, and must do a deep clone when installing.dr_github()
checks for common problems with git/github setup (#643).If you use git,
release()
now warns you if you have uncommited changes, or if you’ve forgotten to synchronise with the remote (#691).install_github()
warns if repository contains submodules (@ashander, #751).
Bug fixes and minor improvements
Previously, devtools ran all external R processes with
R --vanilla
. Now it only suppresses user profiles, and constructs a custom.Rprofile
to override the default. Currently, this.Rprofile
sets up therepos
option. Among others, this enables the cyclic dependency check indevtools::release
(#602, @krlmlr).R_BROWSER
andR_PDFVIEWER
environment variables are set to “false” to suppress random windows opening during checks.Devtools correctly identifies RTools 3.1 and 3.2 (#738), and preserves continuation lines in the
DESCRIPTION
(#709).dev_help()
now usesnormalizePath()
. Hopefully this will make it more likely to work if you’re on windows and have a space in the path.lint()
gains acache
argument (@jimhester, #708).Fixed namespace issues related to
stats::setNames()
(#734, #772) andutils::unzip()
(#761, @robertzk).release()
now reminds you to check the existing CRAN check results page (#613) and shows file size before uploading to CRAN (#683, @krlmlr).RCMD()
andsystem_check()
are now exported so they can be used by other packages. (@jimhester, #699).revdep_check()
creates directories if needed (#759).system_check()
combines arguments with, not
,
. (#753)test()
gains an...
argument so that additional arguments can be passed totestthat::test_dir
(@jimhester, #747)use_travis()
now suggests you link to the svg icon since that looks a little sharper. Default template setsCRAN: http://cran.rstudio.com/
to enable the cyclic dependency check.NOT_CRAN
envvar no longer overrides externally set variable.check(check_version = TRUE)
also checks spelling of theDESCRIPTION
; if no spell checker is installed, a warning is given (#784, @krlmlr).
devtools 1.7.0
CRAN release: 2015-01-17
Improve reverse dependency checking
Devtools now supports a new and improved style of revdep checking with use_revdep()
. This creates a new directory called revdep
which contains a check.R
template. Run this template to check all reverse dependencies, and save summarised results to check/summary.md
. You can then check this file into git, making it much easier to track how reverse dependency results change between versions. The documentation for revdep_check()
is much improved, and should be more useful (#635)
I recommend that you specify a library to use when checking with options("devtools.revdep.libpath")
. (This should be a directory that already exists). This should be difference from your default library to keep the revdep environment isolated from your development environment.
I’ve also tweaked the output of revdep_maintainers()
so it’s easier to copy and paste into an email (#634). This makes life a little easier pre-release.
New helpers
lint()
runslintr::lint_package()
to check style consistency and errors in a package. (@jimhester, #694)use_appveyor()
sets up a package for testing with AppVeyor (@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 hook to a package.use_readme_rmd()
sets up a template to generate aREADME.md
from aREADME.Rmd
with knitr.
Minor improvements
Deprecated
doc_clean
argument tocheck()
has been removed.Initial package version in
create()
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. This ensures that files are sourced in the way you expect, as defined by roxygen@include
tags. If you don’t have any@include
tags, the collate will be not be touched (#623).session_info()
gainsinclude_base
argument to also display loaded/attached base packages (#646).-
release()
no longer asks if you’ve read the CRAN policies since the CRAN submission process now asks the same question (#692).release(check = TRUE)
now runs some additional custom checks. These include:Checking that you don’t depend on a development version of a package.
Checking that the version number has exactly three components (#633).
release()
now builds packages without the--no-manual
switch, both for checking and for actually building the release package (#603, @krlmlr).build()
gains an additional argumentmanual
, defaulting toFALSE
, andcheck()
gains...
unmodified tobuild()
. use_travis()
now sets an environment variable so that 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 users to set. (According to http://cran.rstudio.com/doc/manuals/r-devel/R-exts.html#Using-Makevars)New
setup()
works likecreate()
but assumes an existing, not necessarily empty, directory (#627, @krlmlr).
Bug fixes
When installing a pull request,
install_github()
now uses the repository associated with the pull request’s branch (and not the repository of the user who created the pull request) (#658, @krlmlr).missing_s3()
works once again (#672)Fixed scoping issues with
unzip()
.load_code()
now executes the package’s code with the package’s root as working directory, just likeR CMD build
et al. (#640, @krlmlr).
devtools 1.6.1
CRAN release: 2014-10-07
Don’t set non-portable compiler flags on Solaris.
The file
template.Rproj
is now correctly installed and the functionuse_rstudio
works as it should. (#595, @hmalmedal)The function
use_rcpp
will now create the filesrc/.gitignore
with the correct wildcards. (@hmalmedal)The functions
test
,document
,load_all
,build
,check
and any function that applies to some package directory will work from subdirectories of a package (like the “R” or “inst/tests” directories). (#616, @robertzk)
devtools 1.6
CRAN release: 2014-09-23
Tool templates and create()
create()
no longer generatesman/
directory - roxygen2 now does this automatically. It also no longer generates an package-level doc template. If you want this, useuse_package_doc()
. It also makes a dummy namespace so that you can build & reload without runningdocument()
first.New
use_data()
makes it easy to include data in a package, either indata/
(for exported datasets) or inR/sysdata.rda
(for internal data). (#542)New
use_data_raw()
createsdata-raw/
directory for reproducible generation ofdata/
files (#541).New
use_package()
allows you to set dependencies (#559).New
use_package_doc()
sets up an Roxygen template for package-level docs.New
use_rcpp()
sets up a package to use Rcpp.use_travis()
now figures out your github username and repo so it can construct the markdown for the build image. (#546)New
use_vignette()
creates a draft vignette using Rmarkdown (#572).renamed
add_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)
The release process
You can add arbitrary extra questions to
release()
by defining a functionrelease_questions()
in your package. Yourrelease_questions()
should return a character vector of questions to ask (#451).release()
uses new CRAN submission process, as implemented bysubmit_cran()
(#430).
Package installation
All
install_*
now use the same code and store much useful metadata. Currently onlysession_info()
takes advantage of this information, but it will allow the development of future tools like generic update functions.Vignettes are no longer installed by default because they potentially require all suggested packages to also be installed. Use
build_vignettes = TRUE
to force building and to install all suggested packages (#573).install_bitbucket()
has been bought into alignment withinstall_github()
: this means you can now specify repos with the compactusername/repo@ref
syntax. Theusername
is now deprecated.install_git()
has been simplified and many of the arguments have changed names for consistency with metadata for other package installs.-
install_github()
has been considerably improved:username
is deprecated - please include the user in the repo name:rstudio/shiny
,hadley/devtools
etc.dependencies = TRUE
is no longer forced (regression in 1.5) (@krlmlr, #462).Deprecated parameters
auth_user
,branch
,pull
andpassword
have all been removed.New
host
argument which allows you to install packages from github enterprise (#410, #506).The GitHub API is used to download archive file (@krlmlr, #466) - this makes it less likely to break in the future.
To download a specified pull request, use
ref = github_pull(...)
(@krlmlr, #509). To install the latest release, use"user/repo@*release"
orref = github_release()
(@krlmlr, #350).
install_gitorious()
has been bought into alignment withinstall_github()
: this means you can now specify repos with the compactusername/repo@ref
syntax. You must now always supply user (project) name and repo.install_svn()
lets you install an R package from a subversion repository (assuming you have subversion installed).decompress()
and henceinstall_url()
now work when the downloaded file decompresses without additional top-level directory (#537).
Other minor improvements and bug fixes
If you’re using RStudio, and you’re trying to build a binary package without the necessary build tools, RStudio will prompt to download and install the right thing. (#488)
Commands are no longer run with
LC_ALL=C
- this no longer seems necessary (#507).build(binary = TRUE)
creates an even-more-temporary package library avoid conflicts (#557).check_dir()
no longer fails on UNC paths (#522).check_devtools()
also checks for dependencies on development versions of packages (#534).load_all()
no longer fails on partial loading of a package containing S4 or RC classes (#577).On windows,
find_rtools()
is now run on package load, not package attach.help()
,?
, andsystem.file()
are now made available when a package is loaded withload_all()
, even if the devtools package isn’t attached.load_all()
no longer gives an error when objects listed as exports are missing.Shim added for
library.dynam.unload()
.loaded_packages()
now returns package name and path it was loaded from. (#486)The
parenvs()
function has been removed from devtools, because is now in the pryr package.missing_s3()
uses a better heuristic for determining if a function is a S3 method (#393).New
session_info()
provides useful information about your R session. It’s a little more focussed thansessionInfo()
and includes where packages where installed from (#526).rstudioapi
package moved from suggests to imports, since it’s always needed (it’s job is to figure out if rstudio is available, #458)Implemented own version
utils::unzip()
that throws error if command fails and doesn’t print unneeded messages on non-Windows platforms (#540).Wrote own version of
write.dcf()
that doesn’t butcher whitespace and fieldnames.
devtools 1.5
CRAN release: 2014-04-07
Four new functions make it easier to add useful infrastructure to packages:
add_test_infrastructure()
will create test infrastructure for a new package. It is called automatically fromtest()
if no test directories are found, the session is interactive and you agree.add_rstudio_project()
adds an RStudio project file to your package.create()
gains anrstudio
argument which will automatically create an RStudio project in the package directory. It defaults toTRUE
: if you don’t use RStudio, just delete the file.add_travis()
adds a basic travis template to your package..travis.yml
is automatically added to.Rbuildignore
to avoid including it in the built package.add_build_ignore()
makes it easy to add files to.Rbuildignore
, correctly escaping special characters
Two dependencies were incremented:
devtools requires at least R version 3.0.2.
document()
requires at least roxygen2 version 3.0.0.
Minor improvements
build_win()
now builds R-release and R-devel by default (@krlmlr, #438). It also gains parameterargs
, which is passed on tobuild()
(@krlmlr, #421).check_doc()
now runsdocument()
automatically.install()
gainsthread
argument which allows you to install multiple packages in parallel (@mllg, #401).threads
argument tocheck_cran()
now defaults togetOption("Ncpus")
install_deps(deps = T)
no longer installs all dependencies of dependencies (#369).install_github()
now prefers personal access tokens supplied toauth_token
rather than passwords (#418, @jeroenooms).install_github()
now defaults todependencies = TRUE
so you definitely get all the packages you need to build from source.devtools supplies its own version of
system.file()
so that when the function is called from the R console, it will have special behavior for packages loaded with devtools.devtools supplies its own version of
help
and?
, which will search devtools-loaded packages as well as normally-loaded packages.
Bug fixes
check_devtools()
no longer called bycheck()
because the relevant functionality is now included inR CMD CHECK
and it was causing false positives (#446).install_deps(TRUE)
now includes packages listed inVignetteBuilder
(#396)build()
no longer checks forpdflatex
when building vignettes, as many modern vignettes don’t need it (#398). It also uses--no-build-vignettes
for >3.0.0 compatibility (#391).release()
does a better job of opening your email client 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 @brentonk)check_cran()
records check times for each package tested.Improved default
DESCRIPTION
file created bycreate_description()
. (Thanks to @ncarchedi, #428)Fixed bug in
install_github()
that prevented installing a pull request by supplyingrepo = "username/repo#pull"
. (#388)explicitly specify user agent when querying user name and ref for pull request in
install_github
. (Thanks to Kirill Müller, #405)install_github()
now removes blank lines found in a packageDESCRIPTION
file, protecting users from the vagueerror: contains a blank line
error. (#394)with_options()
now works, instead of throwing an error (Thanks to @krlmlr, #434)
devtools 1.4.1
CRAN release: 2013-11-27
Fixed bug in
dev_help()
that prevented it from working when not using RStudio.source_gist()
respects new github policy by sending user agent (hadley/devtools)install_github()
now takes repo names of the form[username/]repo[/subdir][@ref|#pull]
- this is now the recommended form to specify username, subdir, ref and/or pull for install_github. (Thanks to Kirill Müller, #376)
devtools 1.4
CRAN release: 2013-11-20
Installation improvements
install()
now respects the global optionkeep.source.pkgs
.install()
gains abuild_vignettes
which defaults to TRUE, and ensures that vignettes are built even when doing a local install. It does this by forcinglocal = FALSE
if the package has vignettes, soR CMD build
can follow the usual process. (#344)install_github()
now takes repo names of the formusername/repo
- this is now the recommended form for install_github if your username is not hadley ;)install_github()
now adds details on the source of the installed package (e.g. repository, SHA1, etc.) to the package DESCRIPTION file. (Thanks to JJ Allaire)Adjusted
install_version()
to new meta data structure on CRAN. (Thanks to Kornelius Rohmeyer)Fixed bug so that
install_version()
works with version numbers that contain hyphens. (Thanks to Kornelius Rohmeyer)install_deps()
is now exported, making it easier to install the dependencies of a package.
Other minor improvements
build(binary = TRUE)
now no longer installs the package as a side-effect. (#335)build_github_devtools()
is a new function which makes it easy for Windows users to upgrade to the development version of devtools.create_description()
does a better job of combining defaults and user specified options. (#332)install()
also installs the dependencies that do not have 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 complains about avignettes/
directoryDecompression of zip files now respects
getOption("unzip")
(#326)dev_help
will now use the RStudio help pane, if you’re using a recent version of RStudio (#322)Release is now a little bit smarter: if it’s a new package, it’ll ask you to read and agree to the CRAN policies; it will only ask about dependencies if it has any.
source_url()
(andsource_gist()
) accept SHA1 prefixes.source_gist()
uses the GitHub API to reliably locate the 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 previously extracted directly into the temp directory; this could be a problem if directory names collide. Instead, source packages are now extracted into unique subdirectories.
devtools 1.3
CRAN release: 2013-07-04
Changes to best practices
The documentation for many devtools functions has been considerably expanded, aiming to give the novice package developer more hints about what they should be doing and why.
load_all()
now defaults toreset = TRUE
so that changes to the NAMESPACE etc. are incorporated. This makes it slightly slower (but hopefully not noticeably so), and generally more accurate, and a better simulation of the install + restart + reload cycle.test()
now looks in bothinst/test
andtests/testthat
for unit tests. It is recommended to usetests/testthat
because it allows users to choose whether or not to install test. If you move your tests frominst/tests
totests/testthat
, you’ll also need to changetests/test-all.R
to runtest_check()
instead oftest_package()
. This change requires testthat 0.8 which will be available on CRAN shortly.New devtools guarantee: if because of a devtools bug, a CRAN maintainer yells at you, I’ll send you a hand-written apology note. Just forward me the email and your address.
New features
New
install_local()
function for installing local package files (as zip, tar, tgz, etc.) (Suggested by landroni)parse_deps()
, which parses R’s package dependency strings, is now exported.All package and user events (e.g. load, unload, attach and detach) are now called in the correct place.
Minor improvements and bug fixes
build()
gainsargs
parameter allowing you to add additional arbitrary arguments, andcheck()
gains similarbuild_args
parameter.install_git
gainsgit_arg
parameter allowing you to add arbitrary additional arguments.Files are now loaded in a way that preserves srcreferences - this means that you will get much better locations on error messages, which should considerably aid debugging.
Fixed bug in
build_vignettes()
which prevented files ininst/doc
from being updatedas.package()
no longer uses the full path, which should make for nicer error messages.More flexibility when installing package dependencies with the
dependencies
argument toinstall_*()
(thanks to Martin Studer)The deprecated
show_rd()
function has now been removed.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 Mikhail Titov)
Fix bug so that
document()
will automatically createman/
directoryDefault
DESCRIPTION
gainsLazyData: true
create_description()
now checks that the directory is probably a package by looking forR/
,data/
orsrc/
directoriesRolled back required R version from 3.0 to 2.15.
Add missing import for
digest()
Bump max compatible version of R with RTools 3.0, and add details for RTools 3.1
devtools 1.2
CRAN release: 2013-04-17
Better installation
install
gains alocal
option for installing the package from the local package directory, rather than from a built tar.gz. This is now used by default for all package installations. 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 to specify branch or tag (Fixes #255)
Clean sessions
run_examples
andtest
gain afresh
argument which forces them to run in a fresh R session. This completely insulates the examples/tests from your current session but means that interactive code (likebrowser()
) won’t work.(Fixes #258)New functions
eval_clean
andevalq_clean
make it easy to evaluate code in a clean R session.clean_source
loses thevanilla
argument (which did not work) and gains aquiet
argument
New features
source_url
andsource_gist
now allow you to specify a sha, so you can make sure that files you source from the internet don’t change without you knowing about it. (Fixes #259)build_vignettes
builds usingbuildVignette()
and movies/copies outputs using the same algorithm asR CMD build
. This means thatbuild_vignettes()
now exactly mimics R’s regular behaviour, including building non-Sweave vignettes (#277), building in the correct directory (#231), using make files (if present), and copying over extra files.devtools now sets best practice compiler flags: from
check()
,-Wall -pedantic
and fromload_all()
,-Wall -pedantic -g -O0 -UNDEBUG
. These are prefixed to existing environment variables so that you can override them if desired. (Fixes #257)If there’s no
DESCRIPTION
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.
Minor improvements
check()
now also sets environment variable_R_CHECK_CODE_DATA_INTO_GLOBALENV_
to TRUE (to match current--as-cran
behaviour) (Fixes #256)Improved default email sent by
release()
, eliminatingcreate.post()
boilerplaterevdep
includes LinkingTo by default.Fixed regular expression problem that caused RTools
3.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 to replace, which was the previous behaviour.check_cran
includessessionInfo()
in the summary output (Fixes #273)create()
gains acheck
argument which defaults to FALSE.with_env
will be deprecated in 1.2 and removed in 1.3When
load_all()
calls.onAttach()
and.onLoad()
, it now passes the lib path to those functions.
devtools 1.1
CRAN release: 2013-02-09
source_gist()
has been updated to accept new gist URLs with username. (Fixes #247)test()
anddocument()
now set environment variables, including NOT_CRAN.Test packages have been renamed to avoid conflicts with existing packages on CRAN. This bug prevented devtools 1.0 from passing check on CRAN for some platforms.
Catch additional case in
find_rtools()
: previously installed, but directory empty/deleted (Fixes #241)
devtools 1.0
CRAN release: 2013-01-22
Improvements to package loading
Rcpp attributes are now automatically compiled during build.
Packages listed in depends are
require()
d (Fixes #161, #178, #192)load_all
inserts a special version ofsystem.file
into the package’s imports environment. This tries to simulate the behavior ofbase::system.file
but gives modified results because the directory structure of installed packages and uninstalled source packages is different. (Fixes #179). In other words,system.file
should now just work even if the package is loaded with devtools.Source files are only recompiled if they’ve changed since the last run, and the recompile will be clean (
--preclean
) if any exported header files have changed. (Closes #224)The compilation process now performs a mock install instead of using
R CMD SHLIB
. This means thatMakevars
and makefiles will now be respected and generally there should be fewer mismatches betweenload_all
and the regular install and reload process.S4 classes are correctly loaded and unloaded.
Windows
Rtools detection on windows has been substantially overhauled and should both be more reliable, and when it fails give more information about what is wrong with your install.
If you don’t have rtools installed, devtools now automatically sets the TAR environment variable to internal so you can still build packages.
Minor features
check_cran
now downloads packages from cran.rstudio.com.check()
now makes the CRAN version check optional, and off by default. Therelease()
function still checks the version number against CRAN.In
check()
, it is optional to require suggested packages, using theforce_suggests
option.When
check()
is called, the new default behavior is to not delete existing .Rd files from man/. This behavior can be set with the “devtools.cleandoc” option.install_bitbucket()
now always uses lowercase repo names. (Thanks to mnel)New function
with_lib()
, which runs an expression code with a library path prepended to the existing libpaths. It differs slightly fromwith_libpaths()
, which replaces the existing libpaths.New function
install_git()
installs a package directly from a git repository. (Thanks to David Coallier)If
pdflatex
isn’t available, don’t try to build vignettes withinstall()
orcheck()
. (Fixes #173)install_github()
now downloads from a new URL, to reflect changes on how files are hosted on GitHub.build()
now has avignettes
option to turn off rebuilding vignettes.install(quick=TRUE)
now builds the package without rebuilding vignettes. (Fixes #167)All R commands called from
devtools
now have the environment variableNOT_CRAN
set, so that you can perform tasks when you know your code is definitely not running on CRAN. (Closes #227)Most devtools functions can a quiet argument that suppresses output. This is particularly useful for testing.
Bug fixes
Fixed path issue when looking for Rtools on windows when registry entry is not present. (Fixes #201)
Reloading a package that requires a forced-unload of the namespace now works.
When reloading a package that another loaded package depends on, if there was an error loading the code, devtools would print out something about an error in
unloadNamespace
, which was confusing. It now gives more useful errors.An intermittent error in
clear_topic_index
related to usingrm()
has been fixed. (Thanks to Gregory Jefferis)revdep()
now lists “Suggests” packages, in addition to “Depends” and “Imports”.revdep_check()
now correctly passes therecursive
argument torevdep()
.The collection of check results at the end of
check_cran()
previously did not remove existing results, but now it does.When a package is loaded with
load_all()
, it now passes the name of the package to the.onLoad()
function. (Thanks to Andrew Redd)
devtools 0.8.0
New features
create
function makes it easier to create a package skeleton 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_user
andpassword
arguments if you want to install a package in a private github repo. You only need to specifyauth_user
if it’s not your package (i.e. it’s not yourusername
) (Fixes #116)new
dev_help
function replacesshow_rd
and 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-development package. (Fixes #108)build_vignettes
now looks in modern location for vignettes (vignettes/
) and warn if vignettes found in old location (inst/doc
). Building now occurs in a temporary directory (to avoid polluting the package with build artefacts) and only final pdf files are copied over.new
clean_vignettes
function to remove pdfs ininst/doc
that were built from vignettes invignettes/
load_all
does a much better job at simulating package loading (see LOADING section). It also compiles and loads C/C++/Fortran code.unload()
is now an exported function, which unloads a package, trying harder than justdetach
. It now also unloads 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 longer necessary becauseload_all
can respect namespaces. (Fixes #118)build()
,check()
,install()
etc now run R in--vanilla
mode which prevents it from reading any of your site or personal configuration files. This should prevent inconsistencies between the environment in which the package is run between your computer and other computers (e.g. the CRAN server) (Fixes #145)All system R command now print the full command used to make it easier to understand what’s going on.
Package paths
as.package
no longer uses~/.Rpackages
.as.package
provides more informative error messages when path does not exist, isn’t a directory, or doesn’t contain aDESCRIPTION
file.New function
inst()
takes the name of a package and returns 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 just in-development source packages.New function
devtest()
returns paths to an internal testing packages in devtools.
Loading
Development packages are now loaded into a namespace environment,
, and then the objects namespace are copied to the package environment, . This more accurately simulates how packages are normally loaded. However, all of the objects (not just the exported ones) are still copied to the package environment. (Winston Chang. Fixes #3, #60, and #125) Packages listed in Imports and Depends are now loaded into an imports environment, with name attribute “imports:xxxx”, which is the parent of the namespace environment. The imports environment is in turn a child of the
The NAMESPACE file is now used for loading imports, instead of the DESCRIPTION file. Previously,
load_all
loaded all objects from the packages listed in DESCRIPTION. Now it loads packages (and, when ‘importFrom’ is used, specific objects from packages) listed in NAMESPACE. This more closely simulates normal package loading. It still checks version numbers of packages listed in DESCRIPTION. (Winston Chang)load_all
can now be used to properly reload devtools. It does this by creating a copy of the devtools namespace environment, and callingload_all
from that environment. (Winston Chang)The
.onLoad
and.onAttach
functions for a development package are now both called when loading a package for the first time, or withreset=TRUE
, and the order more correctly simulates normal package loading (create the namespace, call.onLoad
, copy objects to the package environment, and then call.onAttach
). (Winston Chang)load_all
will now throw a warning if a dependency package does not satisfy the version requirement listed in DESCRIPTION. (Winston Chang. Fixes #109)The package environment now has a ‘path’ attribute, similar to a package 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 are exported. (Winston Chang)load_all
now compiles C files in the /src directory. (Winston Chang)New functions
compile_dll()
andclean_dll()
, which compile C/C++/ Fortran source code, and clean up the compiled objects, respectively. (Winston Chang. Fixes #131)
Bug fixes
load_code
now properly skips missing files. (Winston Chang)Add
--no-resave-data
to default build command.The subject line of the email created by
release
is now “CRAN submission [package] [version]”, per CRAN repository policy.install_bitbucket
properly installs zip files of projects stored in Mercurial repositories. (Winston Chang. Fixes #148)build
now builds vignettes becauseinstall
does not. (Fixes #155)
Introspection
New function
loaded_packages()
, which returns the names of packages that are loaded and attached.Packages loaded with
load_all
now store devtools metadata 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 to detect when it is on and to act accordingly.New function
parse_ns_file()
, which parses a NAMESPACE file for a package.New function
parenvs()
, which parents the parent environments of an object. (Winston Chang)
devtools 0.7.1
CRAN release: 2012-07-02
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 older packages
devtools 0.7
CRAN release: 2012-06-19
Installation
install_bitbucket
installs R packages on bitbucket.install
now uses--with-keep.source
to make debugging a little easier.All remote install functions give better error messages in the case of http errors (Fixes #82).
install
has new quick option to make package installation faster, by sacrificing documentation, demos and multi-architecture binaries. (Fixes #77)install_url
,install_github
andinstall_gitorious
gain a subdir argument which makes it possible to install packages that are contained within a sub-directory of a repository or compressed file. (Fixes #64)
Checking
with_debug
function temporarily sets env vars so that compilation is performed with the appropriate debugging flags set. Contributed by Andrew Redd.revdep
,revdep_maintainers
andrevdep_check
for calculating reverse dependencies, finding their maintainers and runningR CMD check
. (Fixes #78)check_cran
has received a massive overhaul: it now checks multiple packages, installs dependencies (in user specified library), and parse check output to extract errors and warningscheck
uses new--as-cran
option to make checking as close to CRAN as possible (fixes #68)
Other new features
devtools now uses options
devtools.path
to set the default path to use with devmode, andgithub.user
to set the default user when installing packages from github.if no package supplied, and no package has been worked with previously, all functions now will try the working directory. (Fixes #87)
on windows, devtools now looks in the registry to find where Rtools 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\Sexpr
s are generated.A suite of
with
functions that allow you to temporarily 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 correct answers 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 the unimportant warning from CYGWIN about the dos style file paths
Bug fixes
decompress
now uses target directory as defined in the function call when expanding a compressed file. (Fixes #84)document
is always run in a C locale so thatNAMESPACE
sort order is consistent across platforms.install
now quoteslibpath
and build path so paths with embedded spaces work (Fixes #73 and #76)load_data
now also loads.RData
files (Fixes #81)install
now hasargs
argument to pass additional 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 in DESCRIPTION collate with files that actually exist in the R directory. (Fixes #14)
devtools 0.6
CRAN release: 2012-02-28
New features
test
function takesfilter
argument which allows you to restrict which tests are to be runcheck
runs with example timings, as is done on CRAN. Run with new paramcleanup = F
to access the timings.missing_s3
function to help figure out if you’ve forgotten to export any s3 methodscheck_cran
downloads and checks a CRAN package - this is useful to run as part of the testing process of your package if you want to check the dependencies of your packagestrict
mode forrun_examples
which runs each example in a clean environment. This is much slower than the default (running in the current environment), but ensures that each example works standalone.dev_mode
now updates prompt to indicate that it’s active (Thanks to Kohske Takahashi)new
source_url
function for sourcing script on a remote server via protocols other than http (e.g. https or ftp). (Thanks to Kohske Takahashi)new
source_gist
function to source R code stored in a github gist. (Thanks to Kohske Takahashi)load_all
now also loads all package dependencies (including suggestions) - this works around some bugs in the way that devtools attaches the development environment into the search path in a way that fails to recreate what happens normally during package loading.
Installation
remote installation will ensure the configure file is executable.
all external package installation functions are vectorised so you can install multiple packages at time
new
install_gitorious
function install packages in gitorious repos.new
install_url
function for installing package from an arbitrary urlinclude
install_version
function from Jeremy Stephens for installing a specific version of a CRAN package from the archive.
Bug fixes
if an error occurs when calling loading R files, the cache will be automatically cleared so that all files are loaded again next time you try (Fixes #55)
functions that run R now do so with
R_LIBS
set to the current.libPaths()
- this will ensure that checking uses the development library if you are in development mode.R_ENVIRON_USER
is set to an empty file to avoid your existing settings overriding this.load_data
(called byload_all
) will also load data defined in R files in the data directory. (Fixes #45)dev_mode
performs some basic tests to make sure you’re not setting your development library to a directory that’s not already an R library. (Fixes #25)
devtools 0.5
CRAN release: 2011-12-04
Improvements and bug fixes
external R commands always run in locale
C
, because that’s what the CRAN severs do.clean_source
sources an R script into a fresh R environment, ensuring that it can run independently of your current working environment. Optionally (vanilla = T
), it will source in a vanilla R environment which ignores all local environment settings.On windows,
devtools
will also add the path tomingw
on startup. (Thanks to pointer from Dave Lovell)
devtools 0.4
CRAN release: 2011-07-23
New functions
new
wd
function to change the working directory to a package subdirectory.check_doc
now checks package documentation as a whole, in the same way thatR CMD check
does, rather than low-level syntax checking, which is done byroxygen2. DESCRIPTION checking has been moved into
load_all.
check_rd` has been removed.build
is now exported, and defaults to building in the package’s parent directory. It also gains a newbinary
parameter controls whether a binary or a source version (with no vignettes or manuals) is built. Confusingly, binary packages are built withR CMD INSTALL
.build_win
sends your package to the R windows builder, allowing you to make a binary version of your package for windows users if you’re using linux or macOS (if you’re using windows already, usebuild(binary = T)
)
Improvements and bug fixes
if using
.Rpackages
config file, default function is used last, not first.on Windows,
devtools
now checks for the presence ofRtools
on startup, and will automatically add it to the path if needed.document
usesroxygen2
instead ofroxygen
. It now loads package dependency so that they’re available when roxygen executes the package source code.document
has new parameterclean
which clears all roxygen caches and removes all existing man files.check
now runsdocument
in this mode.dev_mode
will create directories recursively, and complain if it can’t create them. It should also work better on windows.install_github
now allows you to specify which branch to download, and automatically reloads package if needed.reload
now will only reload if the package is already loaded.release
gainscheck
parameter that allows you to skip package check (if you’ve just done it.)test
automatically reloads code so you never run tests on old code
devtools 0.3
CRAN release: 2011-06-30
new
bash()
function that starts bash shell in package directory. Useful if you want to use git etc.removed inelegant
update_src()
since now superseded bybash()
fix bug in ftp upload that was adding extraneous space
build
function builds package in specified directory.install
,check
andrelease
now all use this function.build
,install
,check
andrelease
better about cleaning up after themselves - always try to both work in session temporary directory and delete any files/directories that they create
devtools 0.2
CRAN release: 2011-06-29
install_github
now usesRCurl
instead of externalwget
to retrieve package. This should make it more robust wrt external dependencies.load_all
will skip missing files with a warning (thanks to suggestion from Jeff Laake)check
automatically deletes.Rcheck
directory on successful completionQuote the path to R so it works even if there are spaces in the path.
devtools 0.1
CRAN release: 2011-06-22
Check for presence of
DESCRIPTION
when loading packages to avoid false positivesinstall
now works correctly withdevel_mode
to install packages in your development libraryrelease
prints news so you can more easily check itAll
R CMD xxx
functions now use the current R, not the first R found on the system path.