renv 1.1.5
CRAN release: 2025-07-24
Fixed an issue where
renv::dependencies()could fail for chunks which had alabelwhich was not a length-one character vector. (#2144)Fixed an issue where
file.rename()could fail when unpacking a package during installation in certain Windows environments. (#2156)renv’s dependency discovery now supports usages ofbase::use(). (#2130)Fixed an issue where
renvcould fail to parse remote references containing an@character. (#2135)Fixed an issue where
renv::sysreqs(distro = <...>)could fail when passed an alternate distribution without a version specifier. (#2105)Fixed an issue where multimode R documents containing chunk headers which did not parse to an R list could cause dependency inference to fail. (#2110)
renv 1.1.4
CRAN release: 2025-03-20
Fixed an issue where
renvcould erroneously record packages installed from Posit Package Manager snapshots as being installed from CRAN. (#2104)renvnow only checks for archived packages during installation whenoptions(renv.install.allowArchivedPackages = TRUE)is set. This fixes an issue whererenvcould erroneously discover that Rcpp 1.3 was available when using the Posit Package Manager repository.Fixed an issue where
renv::dependencies()could fail with an unhelpful error message if the scanned document contained a YAML header whose contents was not a map. (#2117)
renv 1.1.3
CRAN release: 2025-03-18
Fixed an issue where
renv::hydrate()could fail to install packages discovered in the user library duringrenv::init(). (#2109)renv::update()now only updates the packages installed in the project library by default.renv::update(all = TRUE)can be used to also check if packages installed in the default library are out-of-date, and install updated copies into the project library. (#2108)Fixed an issue where package installation could fail on Arch Linux with the error message “don’t know how to check sysreqs on this system”. (#2107)
renvnow supports profile-specific comments within.gitignoreand.renvignorefiles. These are comments of the form#| <code>, where<code>is R code which should indicate if the.renvignorerules should apply. Typically, this should be of the form#| profile == "extra", or#| profile %in% c("extra", "other"). Note that only a small subset of base R functions are available for evaluation in this context. Note that the first section in a.renvignoreimplicitly applies to all profiles – if you want to limit it to just the default profile, you can use#| profile == "default"for the first line. (#1662)The environment variable
RENV_PATHS_VERSIONcan now be used to substitute the R version component normally used in library / cache paths. The provided path can include placeholders like%Vfor the full R version including the patch level, and%vfor the R version without the patch level. Defaults toR-%vwhen unset. (#1687)renv::install()gains thetransactionalargument, for parity withrenv::restore(). (#1109)
renv 1.1.2
CRAN release: 2025-03-02
renvgains thesysreqs()function, which can be used to query the system packages required by a set of R packages. Functionality is currently available for Debian-based distributions, as well as Red Hat distributions.On Linux,
renvnow uses the database from https://github.com/rstudio/r-system-requirements when determining if an R package’s required system libraries are installed, and notifies the user which packages (if any) are missing during install / restore.Fixed an issue where
renvcould fail to retrieve credentials registered for ‘github.com’ when querying URLs at ‘api.github.com’.Fixed an issue where
renvcould stall when loading a project and validating that the configured version of Bioconductor is compatible with the version of R currently in use.renv::snapshot()no longer fails to generate a new lockfile if the project contains a lockfile which could not be read or parsed.Fixed an issue where lockfiles containing unicode characters were not correctly written or read with versions of R (< 4.2.0) on Windows. (#2091)
renv 1.1.1
CRAN release: 2025-02-07
Fixed an issue where very long lockfiles could be truncated on write. (#2089)
Fixed an issue where
renvinadvertently made web requests in tests duringR CMD check.
renv 1.1.0
CRAN release: 2025-01-29
Major Changes
-
renvnow includes additional package DESCRIPTION fields in the lockfile. This can be useful for validating the provenance of packages recorded in the lockfile, and also for applications usingrenvwhich would like to recompute the hash used for package caching from the lockfile itself.If needed, old-style lockfiles can be generated by setting the option
options(renv.lockfile.version = 1). Note that this version ofrenvremains compatible both with the older (minimal) lockfiles, as well as with the newer lockfiles in this release. (#2057)
Other Fixes
The
renvsandbox is now unlocked on exit after a call torenv::use(). This should alleviate issues seen where R’s attempts to clean up the temporary directory could fail due to inadequate permissions on the sandbox directory. (#2076)Fixed an issue where
renv::restore()did not respect the named repository within the lockfile when installing packages from the archives of the configured package repositories. (#2081)Fixed an issue where
renv::snapshot()could fail if invoked within a project containing empty or invalid.ipynbfiles. (#2073)Fixed an issue where R package installation could fail if the project depended on a package whose current version available from the configured package repositories required on a newer version of R than what was currently installed, even if that package need not be updated. (#2071)
Fixed an issue where
RENV_CONFIG_EXTERNAL_LIBRARIESwas incorrectly split when using Windows paths. (#2069)Fixed an issue where
renvfailed to restore packages installed from r-universe when the associated lockfile record had noRemoteReffield. (#2068)renvnow detects dependencies from usages ofutils::citation(). (#2047)Fixed an issue where packages installed from r-universe via an explicit URL remote could not be restored. (#2060)
Fixed an issue where the repositories provided to
renv::init()were ignored when also initializingrenvwith a specific version of Bioconductor.renv::install()gains theincludeparameter, which can be useful when you’d like to install a subset of dependencies within a project while also respecting any declared remotes in that project’sDESCRIPTIONfile. (#2055)Fixed an issue where
renvcould fail to check for updates for packages installed usingpakwithout an explicit branch specified. (#2040)renv::use()no longer re-installs packages which are already installed and compatible with the requested packages. (#2044)Fixed an issue where
renv::init()could fail when using named remotes in a DESCRIPTION file’sRemotes:field. (#2055)Fixed an issue where ignore rules of the form
!*.*were not parsed and handled correctly during dependency discovery. (#2052)Fixed an issue where
renverroneously reported that installed packages were cached when the cache was not writable. (#2041).renvnow supports updating of currently-installed packages viarenv::install()when configured to usepak. (#2037)Fixed an issue where
renvlibrary paths were not properly reset following a suspend / resume in RStudio Server. (#2036)renv::run()gains theargsparameter, which can be used to pass command-line arguments to a script. (#2015)renvnow infers a dependency onrmarkdownandknitrfor R scripts which include YAML front-matter. (#2023)The performance of
renv’s built-in JSON reader has been improved. (#2021)Fixed an issue where
renvcould erroneously create a binding called ‘object’ in the global environment on startup. (#2017)
renv 1.0.11
CRAN release: 2024-10-12
Fixed an issue where headers were not properly passed to
available.packages()duringrenvbootstrap. (#1942)renvnow assumes that Artifactory package repositories will use a CRAN-like layout of packages for packages in the archive. (#1996)renvnow includes compiled extensions on Linux + macOS. These extensions are primarily used to improve the performance ofrenv::dependencies()and other static analysis code. Support for Windows may come in a future release.Fixed an issue where
renv::snapshot()could fail if the project contained a call tomodule()with no arguments. (#2007)On Linux,
renvnow emits a message on load if the R temporary directory is within a folder that has been mounted as ‘noexec’. This message can be suppressed by setting theRENV_TEMPDIR_NOEXEC_CHECK=FALSEenvironment variable.
renv 1.0.10
CRAN release: 2024-10-05
Fixed a performance regression in
renv::dependencies(). (#1999)Fixed an issue where
renvtests could fail if theparallelpackage was loaded during test execution.renvnow determines a package repository’s type through the HTTP headers provided when accessingsrc/contrib/PACKAGES. This is mainly relevant when detecting Nexus and Artifactory repositories.
renv 1.0.8
CRAN release: 2024-09-20
renvnow infers a dependency on theraggpackage when theragg_pngdevice is used in R Markdown / Quarto documents, for documents using the codeknitr::opts_chunk$set(dev = "ragg_png"). (#1985)renvnow automatically generates a lockfile when loading a project containing amanifest.jsonfile (typical for application bundles published to Posit Connect). (#1980, @toph-allen)renv::install()now errs if an incompatibletypeargument is provided.renv::checkout()now also checks out the version ofrenvavailable and associated with the requested snapshot date. (#1966)Fixed an issue where
renv::hydrate()did not hydrate packages which were also listed as dependencies within a project’sDESCRIPTIONfile. (#1970)Fixed an issue where
renv::checkout()omitted some fields from lockfile records when usingactions = c("snapshot", "restore"). (#1969)renvgains the functionrenv::retrieve(), which can be used to download packages without installing them. This is primarily useful in CI / CD scenarios, where you might want to download packages in a single stage before attempting to install / restore them. (#1965)renvnow preservesRemotefields present on packages installed from public package repositories (e.g. https://r-universe.dev/). (#1961)Fixed an issue where
renv::load()could fail to load an alternate project whenoptions(renv.config.autoloader.enabled = FALSE)was set. (#1959)renvnow emits clickable hyperlinks for runnable code snippets and help, for front-ends which support theide:runandide:helpANSI escapes.renv::init(bioc = "<version>")now prompts the user in interactive sessions when requesting a version of Bioconductor which is not compatible with the current version of R. (#1943)renv::restore()gains thetransactionalargument, which can be used to control whetherrenvwill allow successfully-installed packages remain in the project library even if a package fails to install during a later step. (#1109)renvnow infers a dependency on thexml2package for projects using thetestthat::JunitReporterfor tests. (#1936)Fixed an issue where
renv::dependencies()could emit a warning when attempting to parse chunks using chunk options like#| eval: c(1, 2). (#1906)renv::install()now properly delegates thetypeandrebuildarguments topakwhenoptions(renv.config.pak.enabled = TRUE)is set. (#1924)renvnow infers a dependency on thesvglitepackage if it detects calls of the formggsave(filename = "path.svg"). (#1930)renvnow supports setting of GitHub authentication credentials via any ofGITHUB_TOKEN,GITHUB_PAT, andGH_TOKEN. (#1937)renvnow also passes any custom headers available toutils::available.packages()during bootstrap. (#1942)Fixed an issue where
renvcould fail during installation of packages stored within repository sub-directories, if that repository also contained a top-level DESCRIPTION file. (#1941)renvnow normalizes lockfile entries for Bioconductor packages installed viapak::pkg_install(), to help prevent spurious diffs being produced viarenv::status(). (#1920)renv::install()now respects thepromptparameter whenpakis enabled, as viaoptions(renv.config.pak.enabled = TRUE). (#1907)Fixed an issue with
renv’spakintegration whererenvcould install the wrong version of a GitHub package during restore ifoptions(renv.config.pak.enabled = TRUE)was set. (#1883)renvno longer interacts with the user during autoloading, which coincides with R startup. If the IDE offers a session init hook (RStudio does), loading is deferred until startup is complete and interaction is possible. Otherwise, any suggested renv actions, such asrenv::restore(), are emitted as a message for the user to act on. (#1879, #1915).Fixed an issue where installation of packages from local sources, as via
install("<package>", repos = NULL, type = "source"), could fail. (#1880)A new function,
renv::lockfile_validate(), can be used to validate yourrenv.lockagainst a default or custom schema. (#1889)
renv 1.0.7
CRAN release: 2024-04-11
- Fixed an issue where
renv’s activate script failed to report version conflict errors when starting up. (#1874)
renv 1.0.6
CRAN release: 2024-04-11
Fixed an issue where downloads could fail with curl >= 8.7.1. (#1869)
Fixed an issue where
renv::snapshot()did not properly normalize package records generated from packages installed using thepakpackage, e.g. viapak::pkg_install("cran::<package>").Fixed an issue where
renvcould incorrectly prompt the user to record a version ofrenvinstalled from GitHub in some cases. (#1857)renv::load()now delegates tobase::load()when it detects that the call was likely intended forbase::load(), butrenv::load()was used instead (e.g. becausebase::load()was masked byrenv::load()).renv::update()gains thelockargument, which can be used to instructrenvto automatically update the lockfile after the requested packages have been updated. (#1849)Fixed an issue where
renvcould fail to update the project autoloader after callingrenv::upgrade(). (#1837)Fixed an issue where attempts to install binary packages from older PPM snapshots could fail. (#1839)
renvnow uses a platform-specific prefix on Linux for library and cache paths by default with R (>= 4.4.0). This is equivalent to settingRENV_PATHS_PREFIX_AUTO = TRUE. If necessary, this behavior can be disabled by settingRENV_PATHS_PREFIX_AUTO = FALSEin an appropriate R startup file. (#1211)
renv 1.0.5
CRAN release: 2024-02-29
renvnow only writes a.renvignorefile into the cache directory if the cache appears to be part of the current project.renvnow reports missing system libraries as part of its ABI checks inrenv::diagnostics().Fixed an issue where
renv::install(lock = TRUE)produced lockfiles containing records with extraneous data. (#1828)
renv 1.0.4
CRAN release: 2024-02-21
renv::install()gains thelockargument. WhenTRUE, the project lockfile will be updated after the requested packages have been successfully installed. (#1811)renvnow supports the use of GitHub Enterprise servers with thegitcredspackage for authentication credentials. (#1814)renv::dependencies()now treats#| eval: !expr <...>chunk options as truthy by default, implying that such chunks are scanned for their R package dependencies. (#1816)renv::dependencies()now requires usages of the import package to be namespace-qualified in order to be handled via static analysis; that is,import::from(<pkg>)is parsed for dependencies, butfrom(pkg)is not. (#1815)renv::load()gains theprofileargument, allowing one to explicitly load a specific profile associated with anrenvproject. Seevignette("profiles", package = "renv")or https://rstudio.github.io/renv/articles/profiles.html for more details.renv::dependencies()no longer includesRdependency versions declared from aDESCRIPTIONfile in its output. (#1806)Fixed an issue where
renvcould fail to infer dependencies from R Markdown code chunks using engine ‘R’ (upper-case) rather than ‘r’ (lower-case). (#1803)Fixed an issue where
renvdid not report out-of-sync packages when one or more packages used in the project were not installed. (#1788)Fixed an issue where
renvcould over-aggressively activate P3M repositories when initializing a project. (#1782)renv::status()now notifies the user if the version of R recorded in the lockfile does not match the version of R currently in use. (#1779)Fixed an issue where packages could appear multiple times in the lockfile, if that package was installed into multiple library paths. (#1781)
Installation of historical binaries of packages is once again enabled, now using the Posit Public Package Manager (P3M) service instead of Microsoft’s (now defunct) MRAN service.
renv::init()now respects theRemotes:field declared in a project’sDESCRIPTIONfile, if any. (#1522)renv::embed()now supports Quarto Markdown (.qmd) files. (#1700)renv now sets the
R_INSTALL_TARenvironment variable to match the defaulttarexecutable (if any) when installing packages. (#1724)renv now uses
--ssl-revoke-best-effortby default when downloading files usingcurlon Windows. (#1739)Fixed an issue where
renv::install()could fail to detect incompatible recursive package dependencies. (#1671)renv::install()now records remote information for packages installed from CRAN-like repositories, and uses that information when generating a lockfile and restoring those packages. This helps ensure that packages installed within an renv project via calls likerenv::install("<pkg>", repos = "<repos>")can still be successfully restored in future sessions. (#1765)renv::install()now lazily resolves project remotes. (#1755)renv::init()now respects Remotes declared within a project’sDESCRIPTIONfile, if any.Calling
renv::activate()without explicitly providing theprofileargument now preserves the current profile, if any. Userenv::activate(profile = "default")if you’d like to re-activate a project using the default profile. (#1217)Fixed an issue where
renvwould try to prompt for the installation ofBiocManagerwhen activating a project using Bioconductor. (#1754)Fixed an issue where directories containing a large number of files could cause
renvto fail to activate a project. (#1733)Expanded the set of Linux distributions detected for automatic transformation of Posit Package Manager URLs to install binary packages.
renvnow correctly detects Red Hat Enterprise Linux 9, Rocky Linux 8 and 9, SLES 15 SP4 and SP5, Debian 11 and 12, AlmaLinux 8 and 9, and Amazon Linux 2. (#1720, #1721)
renv 1.0.3
CRAN release: 2023-09-19
Fixed an issue where
renvcould warn the project appeared to be out-of-sync when using packages installed without an explicit source recorded. (#1683)renv::install()gains theexcludeargument, which can be useful when installing a subset of project dependencies.Fixed an issue where PPM repositories were not appropriately transformed into the correct binary repository in
renv::restore()when using pak.renv::init()no longer prompts the user for the intended action for projects containing a library with only renv installed. (#1668)Fixed an issue where non-interactive usages of
renv::init()could fail with projects containing a DESCRIPTION file. (#1663)Fixed an issue that could cause code within a project
.Rprofileto execute before the project had been loaded in RStudio. (#1650)renv::snapshot()andrenv::status()gain thedevargument. This can be used when you’d like to capture package dependencies from the Suggests field of your package’s DESCRIPTION file. (#1019)
renv 1.0.2
CRAN release: 2023-08-15
renv now parses package
NAMESPACEfiles for imported dependencies. (#1637)renv no longer locks the sandbox by default.
Fixed an issue where renv used the wrong library paths when attempting to activate the watchdog. This could cause a 10 second delay when activating the sandbox.
renv 1.0.1
CRAN release: 2023-08-10
Fixed an issue where authentication headers could be duplicated when using the
libcurldownload method. (#1605)renv::use()now defaults to settingisolate = TRUEwhensandbox = TRUE.Fixed an issue where the renv watchdog could fail to load, leading to slowness in activating the sandbox on startup. (#1617)
Fixed an issue where renv did not display warnings / errors from
renv::snapshot()whenoptions(renv.verbose = FALSE)was set. The display of these messages is now controlled via therenv.caution.verboseR option. (#1607, #1608)renv::load()now notifies the user if the synchronization check took an excessive amount of time due to the number of files being scanned in the project. (#1573)renv::init()gains theloadargument, making it possible to initialize a project without explicitly loading it. (#1583)renv now uses a lock when synchronizing installed packages with the cache. This should help alleviate issues that can arise when multiple R processes are installing and caching packages concurrently. (#1571)
Fixed a regression in parsing expressions within R Markdown chunk options. (#1558)
Fixed an issue that prevented
renv::install()from functioning when source-only repositories were included. (#1578)Fixed a logic error in reading
RENV_AUTOLOAD_ENABLED. (#1580)renv::restore()no longer runs without prompting on load if the library is empty. (#1543)renv::repair()now checks for installed packages which lack a known remote source, and updates theirDESCRIPTIONfiles if it can infer an appropriate remote source. This typically occurs when a package is installed from local sources, but appears to be maintained or published on a remote repository (e.g. GitHub). This was previously done inrenv::snapshot(), but we’ve rolled back that change as the prompting was over-aggressive. (#1574)renv::status()now first reports on uninstalled packages, before reporting on used <-> installed mismatches. (#1538)When the
RENV_STARTUP_DIAGNOSTICSenvironment variable is set toTRUE, renv now displays a short diagnostics report after a project’s autoloader has been run. This can be useful when diagnosing why renv is slow to load in certain projects. (#1557)renv now ensures the sandbox is activated on load, for R processes which are launched with the renv sandbox on the library paths. (#1565)
renv::restore()no longer erroneously prompts when determining the packages which need to be installed. (#1544)renv::update()now ensures thepromptparameter is properly respected during package installation. (#1540)renv::activate()no longer erroneously preserves the previous library paths after restarting the session within RStudio. (#1530)Use correct spelling of IRkernel package (#1528).
Honor
R_LIBCURL_SSL_REVOKE_BEST_EFFORTwhen using an externalcurl.exebinary to download files. (#1624)
renv 1.0.0
CRAN release: 2023-07-07
New features
New
renv::checkout()installings the latest-available packages from a repository. For example,renv::checkout(date = "2023-02-08")will install the packages available on 2023-02-08 from the Posit Package Manager repository. Theactionsargument allows you choose whether a lockfile is generated from the provided repositories (“snapshot”), or whether packages are installed from the provided repositories (“restore”).renv::deactivate()gains acleanargument: whenTRUEit will delete all renv files/directories, leaving the project the way it was found.renv::init()now uses Posit Public Package Manager by default, for new projects where the repositories have not already been configured externally. See the optionsrenv.config.ppm.enabled,renv.config.ppm.default, andrenv.config.ppm.urlin?configfor more details (#430).renv::lockfile_create(),renv::lockfile_read(),renv::lockfile_write()andrenv::lockfile_modify()provide a small family of functions for interacting with renv lockfiles programmatically (#1438).Handling of development dependencies has been refined.
renv::snapshot()andrenv::status()no longer track development dependencies, whileinstall()continues to install them (#1019).Suggestedpackages listed inDESCRIPTIONfiles are declared as development dependencies regardless of whether or not they’re a “package” project.MRAN integration is now disabled by default, pending the upcoming shutdown of Microsoft’s MRAN service. Users who require binaries of older R packages on Windows + macOS can consider using the instance of CRAN mirrored by the Posit Public Package Manager (#1343).
Bug fixes and minor improvements
Development versions of renv are now tracked using the Git SHA of the current commit, rather than a version number that’s incremented on every change (#1327). This shouldn’t have any user facing impact, but makes renv maintenance a little easier.
Fixed an issue causing “restarting interrupted promise evaluation” warnings to be displayed when querying available packages failed. (#1260)
renv::activate()uses a three option menu that hopefully make your choices more clear (#1372).renv::dependencies()now discovers R package dependencies inside Jupyter notebooks (#929).renv::dependencies()includes packages used by user profile (~/.Rprofile) ifrenv::config$user.profile()isTRUE. They are set as development dependencies, which means that they will be installed byinstall()but not recorded in the snapshot.renv::dependencies()only extracts dependencies from text in YAML headers that looks like valid R code (#1288).renv::dependencies()no longer treatsbox::use(module/file)as using packagemodule(#1377).renv::init()now prompts the user to select a snapshot type if the project contains a top-level DESCRIPTION file (#1485).renv::install(type = "source")now ensures source repositories are used in projects using PPM. (#927)renv::install()activates Bioconductor repositories when installing a package from a remote (e.g. GitHub) which declares a Bioconductor dependency (via a non-empty ‘biocViews’ field) (#934).renv::install()respects the project snapshot type, if set.renv::install()now keeps source when installing packages from source (#522).renv::install()now validates that binary packages can be loaded after installation, in a manner similar to source packages (#1275).renv::install()now supports Bioconductor remotes of the formbioc::<BiocVersion>/<Package>, for installing packages from a particular version of Bioconductor. Aliases like ‘release’ and ‘devel’ are also supported (#1195).renv::install()now requires interactive confirmation that you want to install packages (#587).renv::load()gives a more informative message if a lockfile is present but no packages are installed (#353).renv::load()no longer attempts to query package repositories when checking if a project is synchronized (#812).renv::load()no longer duplicates entries on thePATHenvironment variable (#1095).renv::restore()can now usepak::pkg_install()to install packages whenpakintegration is enabled. SetRENV_CONFIG_PAK_ENABLED = TRUEin your project’s.Renvironif you’d like to opt-in to this behavior. Note that this requires a nightly build ofpak(>= 0.4.0-9000); see https://pak.r-lib.org/dev/reference/install.html for more details.renv::restore()now emits an error if called within a project that does not contain a lockfile (#1474).renv::restore()correctly restores packages downloaded and installed from r-universe (#1359).renv::snapshot()now standardises pak metadata so CRAN packages installed via pak look the same as CRAN packages installed with renv orinstall.packages()(#1239).If
renv::snapshot()finds missing packages, a new prompt allows you to install them before continuing (#1198).renv::snapshot()no longer requires confirmation when writing the first snapshot, since that’s an action that can easily be undone (by deletingrenv.lock) (#1281).renv::snapshot()reports if the R version changes, even if no packages change (#962).renv::snapshot(exclude = <...>)no longer warns when attempting to exclude a package that is not installed (#1396).renv::status()now uses a more compact display when packages have some inconsistent combination of being installed, used, and recorded.renv::status()now works more likerenv::restore()when package versions are different (#675).renv::update()can now update packages installed from GitLab (#136) and BitBucket (#1194).renv::settings$package.dependency.fields()now only affects packages installed directly by the user, not downstream dependencies of those packages.renv functions give a clearer error if
renv.lockhas somehow become corrupted (#1027).
renv 0.17.3
CRAN release: 2023-04-06
Fixed an issue where
renv::install("bioc::<package>")could fail ifBiocManagerwas not already installed. (#1184)Fixed an issue where package names were not included in the output of
renv::diagnostics(). (#1182)The clarity of the message printed by
renv::status()has been improved; in particular, renv should better report the recommended actions when a package required by the project is not installed.renv::snapshot()gains theexcludeargument, for explicitly excluding certain packages from the generated lockfile.Fixed an issue where renv was passing the wrong argument name to
installed.packages(), causing usages of renv to fail with R (<= 3.4.0). (#1173)renv now sets the
SDKROOTenvironment variable on macOS if it detects that R was built using an LLVM build ofclangon macOS.renv::install()now parses the remotes included within, for example, aDESCRIPTIONfile’sConfig/Needs/...field.renv now checks that the index directory is writable before attempting to use it, e.g. for the
Ravailable packages index maintained by renv. (#1171)renv now checks that the version of
curlused for downloads appears to be functional, and reports a warning if it does not (for example, because a requisite system library is missing). The version ofcurlused for downloads can also be configured via theRENV_CURL_EXECUTABLEenvironment variable.
renv 0.17.2
CRAN release: 2023-03-17
- Fixed a regression that caused package hashes to be computed incorrectly in some cases. This was a regression in the 0.17.1 release. (#1168)
renv 0.17.1
CRAN release: 2023-03-16
renv gains the configuration option
install.remotes, which can be used to control whether renv attempts to read and use theRemotes:field included with installed packages. This can be set toFALSEif you’d like to ignore this field; e.g. because you know they will not be accessible. (#1133)General performance optimizations. In particular,
renv::update(check = TRUE)should now execute much faster.renv now stores project settings within
renv/settings.jsonrather thanrenv/settings.dcf. Old settings will be automatically migrated.The renv sandbox is now placed within the renv cache directory. (#1158)
Fixed an issue where
renv::status()could erroneously report a project was out-of-sync when using explicit snapshots. (#1159)Fixed an issue where
renv::hydrate()would print spurious warnings. (#1160)renv::status()now suggests runningrenv::restore()if there are no packages installed in the project library. (#1060)Fixed an issue where renv would fail to query r-universe repositories. (#1156)
renv no longer tries to set the
SDKROOTenvironment variable on macOS for R (>= 4.0.0).Fixed an issue where installation of Bioconductor packages could fail when
BiocManagerwas not installed. (#1156, #1155)Fixed an issue where the amount of time elapsed reported by
renv::install()failed to include the time spent retrieving packages.
renv 0.17.0
CRAN release: 2023-03-02
The performance of
renv::snapshot()has improved.renv now maintains an index of available packages, as retrieved from the active package repositories, that is shared across
Rsessions. This should improve renv’s performance when querying for available packages across multiple differentRsessions.renv::hydrate()gains thepromptparameter. WhenTRUE(the default), renv will prompt for confirmation before attempting to hydrate the active library.Improved handling of package installation via SSH URLs with
git. (#667)Improved handling of R version validation when using projects with Bioconductor. If you find renv is erroneously reporting that your version of R is incompatible with the version of Bioconductor you are using, you can set
options(renv.bioconductor.validate = FALSE)to disable this validation behaviour. (#1148)Package names can now be associated with remotes in
renv::install(); for example, you can userenv::install("igraph=igraph/rigraph")to install theigraphpackage. This is mainly important when using therenv.authauthentication tools, where the package name of a remote needs to be declared explicitly. (#667)Fixed an issue that could prevent
renv::restore()from functioning when attempting to install packages which had been archived on CRAN. (#1141)renv::install()gains thedependenciesargument, which behaves similarly to the equivalent argument inremotes::install_*(). In particular, this can be set to fields likeConfig/Needs/devto tell renv to use custom DESCRIPTION fields for dependency resolution in installation.Fixed an issue where the function variant of the
renv.authoption was not resolved correctly. (#667)renv::install()now supports remotes with a trailing slash – such slashes are now removed. (#1135)Integration with the RStudio (Posit) Package Manager is now disabled by default on aarch64 Linux instances.
The
RENV_CACHE_MODEenvironment variable can now also be used to adjust the permissions set on downloaded package tarballs / binaries. (#988)Fixed an issue where fields of the form
Remotes.1could enter lockfile records for older versions of R. (#736)Fixed the performance of
renv::update()in cases where integration with MRAN is enabled.Fixed an issue where package installation using
pakcould fail in some cases.renv_file_find()can now scan up to the root directory in Docker containers. (#1115)renv no longer uses the R temporary directory on Windows for the sandbox. The sandbox directory can be customized via the
RENV_PATHS_SANDBOXenvironment variable if required. (#835)renv now reports the elapsed time when installing packages. (#1104)
For projects using “explicit” snapshots, renv now reports if a package is required by the project, but the package is not currently installed. (#949)
Fixed an issue where
renv::snapshot()could fail to detect when no changes had been made to the lockfile.Fixed an issue where renv could emit JSON lockfiles which could not be parsed by external JSON readers. (#1102)
renv now marks the sandbox as non-writable, which should hopefully alleviate issues where attempts to update installed packages would inadvertently install the updated package into the sandbox. (#1090)
renv::use()gains thesandboxargument, which allows one to control whether the system library is sandboxed after a call torenv::use(). (#1083)The path to the Conda
environment.ymlfile created by renv can now be customized via theRENV_PATHS_CONDA_EXPORTenvironment variable. We recommend setting this within your project-local.Renvironfile as appropriate. (#1089)Fixed an issue where the renv sandbox location did not respect the active renv profile. (#1088)
renv 0.16.0
CRAN release: 2022-09-29
renv now supports installation of packages with remotes of the form
<package>=<remote>. However, the provided package name is ignored and is instead parsed from the remote itself. (#1064)renv now passes along the headers produced by the
renv.download.headersoption when bootstrapping itself in the call toutils::download.file(). (#1084)renv now reports if
renv::snapshot()will change or update the version of R recorded in the lockfile. (#1069)renv now supports the
install.packages.check.sourceR option, which is used to allow R to query source repositories even if the optionoptions(pkgType = "binary")is set. (#1074)renv better handles packages containing git submodules when installed from GitHub remotes. (#1075)
renv now handles local sources within the current working directory. (#1079)
The renv sandbox is once again enabled by default. On Unix, the sandbox is now created by default within the project’s
renv/sandboxlibrary. On Windows, the sandbox is created within the R session’stempdir(). The path to the renv sandbox can be customized via theRENV_PATHS_SANDBOXenvironment variable if required.Fixed an issue where
renv::status()could report spurious changes when comparing packages installed usingpakin some cases. (#1070)renv::restore()now also ensures the project activate script is updated after a successful restore. (#1066)Fixed an issue where renv could attempt to install a package from the repository archives even when
type = "binary"was set. (#1046)Fixed an issue where package installation could fail when the R session is configured to use multiple repositories, some of which do not provide any information on available packages for certain binary arms of the repository. (#1045)
renv now uses
jsonlitefor reading lockfiles when loaded. This should help ensure useful errors are provided for manually-edited lockfiles which contain a JSON parsing error. If thejsonlitepackage is not loaded, renv will fall back to its own internal JSON parser. (#1027)Fixed an issue that would cause renv to fail to source the user
~/.Rprofileif it attempted to register global calling handlers, e.g. asprompt::set_prompt()does. (#1036)(Linux only) renv now resets ACLs on packages copied to the cache, to avoid persisting default ACLs that might have been inherited on packages installed into a local project library. If desired, this behavior can be disabled by setting the
RENV_CACHE_ACLSenvironment variable toFALSE. If you need finer control over ACLs set on packages moved into the cache, consider defining a custom callback via therenv.cache.callbackR option. (#1025)Fixed an issue where
.gitignoreinclusion rules for sub-directories were not parsed correctly by renv for dependency discovery. (#403)Fixed an issue where renv could report spurious diffs within
renv::status()when comparing package records installed frompakversus the default R package installer. (#998)Fixed an issue where
renv::use_python()could cause the Requirements field for packages in the lockfile to be unintentionally dropped. (#974)The R option
renv.cache.callbackcan now be set, to run a user-defined callback after a package has been copied into the cache. This can be useful if you’d like to take some action on the cached package’s contents after the package has been moved into the cache.(Unix only) The
RENV_CACHE_MODEenvironment variable can now be used to change the access permissions of packages copied into the cache. When set, after a package is copied into the cache, renv will usechmod -Rfto try and change the permissions of the cache entry to the requested permissions.(Unix only) The
RENV_CACHE_USERenvironment variable can now be used to change the ownership of folders copied into the cache. When set, after a package is copied into the cache, renv will usechown -Rfto try and change the ownership of that cache entry to the requested user account.Fixed an issue where repositories containing multiple packages in sub-directories could fail to install. (#1016)
renv 0.15.5
CRAN release: 2022-05-26
Fixed an issue where indexing of packages in the package cellar could be slow. (#1014)
Fixed an issue where installation of packages from Bioconductor’s binary Linux package repositories could fail. (#1013)
renv::restore()now supports restoration of packages installed from R-Forge. (#671)Fixed an issue where
renv::init(bioconductor = TRUE)would not update the version of Bioconductor used if a project setting had already been set.It is now possible to “update” an existing lockfile by using
renv::snapshot(update = TRUE). When set, any records existing in the old lockfile, but not the new lockfile, will be preserved. (#727)Fixed an issue where renv could fail to parse Git remotes for users whose username contains a number. (#1004)
renv no longer infers a dependency on the “quarto” R package in projects containing a
_quarto.ymlfile. (#995)Fixed an issue where renv could fail to download a package from MRAN if a compatible source package of the same version was available from the active R repositories. (#990)
renv now reports permission errors during download more clearly. (#985)
Fixed an issue where
RENV_PATHS_LIBRARY_ROOT_ASISwas not interpreted correctly. (#976)renv::modify()gains thechangesargument, which can be used to modify a project lockfile non-interactively.renv::clean()now returns the project directory, as documented. (#922)Fixed an issue where renv could fail to parse embedded YAML chunk options in R Markdown documents. (#963)
renv now sets default placeholder names for the
reposR option, for any repository URLs which happen to be unnamed. (#964)Fixed an issue where renv didn’t respect the
PATHordering when discovering Python installations viarenv_python_discover(). (#961)Fixed an issue where renv could fail to install packages containing multibyte unicode characters in their DESCRIPTION file. (#956)
Fixed detection of Rtools 4.2 (#1002)
renv 0.15.4
CRAN release: 2022-03-02
- Fixed an issue where package installation could fail when referencing the cache via a tilde-aliased path, e.g.
~/.local/share/renv. (#953)
renv 0.15.3
CRAN release: 2022-02-28
A variety of fixes for R CMD check.
renv gains an experimental function,
renv::autoload(), to be used as a helper for automatically loading a project for R processes launched within a sub-directory of that project. See?renv::autoloadfor more details.renv will now print a warning message when attempting to read a lockfile containing merge conflict markers (as from e.g. a git merge). (#945)
Fixed an issue where
renv::install()could install into the wrong library path on Windows, if the R installation had a site-wide profile that mutated the library paths. (#941)Fixed an issue where
renv::install()would fail to find a package within the cache when using an abbreviated commit hash for installation. (#943)Fixed an issue where renv’s automatic snapshot was not run after calls to
renv::install()in some cases. (#939)Fixed an issue where renv would incorrectly copy a package from the cache, if the cached version of the package and the requested version of the package had the same package version, even if they were retrieved from different sources. (#938)
The path to an renv tarball can now be set via the environment variable
RENV_BOOTSTRAP_TARBALL, to be used to help renv bootstrap from local sources. This can either be the path to a directory containing renv source tarballs, or the path to the tarball itself.Fixed an issue where the R site library would not be appropriately masked for resumed RStudio sessions. (#936)
renv 0.15.1
CRAN release: 2022-01-13
Fixed an issue where renv inadvertently inserted extra newlines into a
DESCRIPTIONfile when addingRemotesfields after install. (#914)Fixed an issue where packages installed from a remote sub-directory would fail to install when later re-installed from the cache. (#913)
renv now recognizes YAML chunk options of the form
#| key: valuewhen used in R Markdown documents. (#912)Fixed an issue where the R site library was visible in renv projects with the system library sandbox disabled.
Fixed an issue where renv could update the wrong
.gitignorein R processes launched bycallr(e.g. indevtools::install). (#910)Fixed an issue where renv could fail to read mis-encoded DESCRIPTION files. (#908)
Fixed an issue where
config$cache.symlinks()would reportNULLwhen unset. (#906)
renv 0.15.0
CRAN release: 2022-01-04
The development branch for renv has moved from master to main.
renv package records in the lockfile now include a
Requirementsentry, which gives a list of R packages this package depends on in some way. This is primarily for internal use by thepakpackage.Fixed an issue where packages containing DESCRIPTION files using a latin1 encoding would not be read correctly by renv.
Fixed an issue that could cause
renv::dependencies()to fail when a malformedDESCRIPTIONfile was encountered. (#892)The path to the project-local renv folder can now be configured via the
RENV_PATHS_RENVenvironment variable. This can be useful if you’d prefer to store your project’s renv resources within an alternate location in the project. (#472)renv now uses an external library by default for R package projects, with the library located within
tools::R_user_dir("renv", "cache"). This directory can be configured via theRENV_PATHS_LIBRARY_ROOTenvironment variable if desired. Seevignette("packages", package = "renv")for more details. (#384)renv now uses the repositories as defined within the project lockfile (if any) when attempting to bootstrap itself in a project. (#820)
The renv sandbox is now disabled by default – see #614 for more details.
renv gains the function
repair(), to be used to attempt to repair the project library when links into the global package cache appear to be broken. (#378)Fixed an issue where the staging library used during install could fail to inherit the same directory permissions as the target library itself. (#331)
Fixed an regression which caused
renv::history()to fail. (#886)renv gains experimental support for the pak package. Set
RENV_CONFIG_PAK_ENABLED = TRUEin an appropriate.Renvironfile to enablepakintegration. When enabled, calls torenv::install()will usepakto download and install packages.renv::init()gains thebioconductorargument, to be used to initialize a project with a particular Bioconductor release. You can also userenv::init(bioconductor = TRUE)to initialize with the latest-available release for the version of R being used.Project settings can now be overridden by setting an R option of the same name. For example, one could force a project to use Bioconductor 3.14 by setting
options(renv.settings.bioconductor.version = "3.14")within the project.Rprofile(or similar startup R profile).The ad-hoc package repository called “local sources” has been renamed to the “package cellar”. In addition, the path to the cellar is now controlled by the
RENV_PATHS_CELLARenvironment variable, rather thanRENV_PATHS_LOCAL. This change was made to reduce confusion between “local sources” of packages located somewhere on the filesystem, as opposed to packages explicitly placed in this ad-hoc repository.RENV_PATHS_LOCALremains supported for backwards compatibility.The
RENV_PATHS_CELLARenvironment variable can now be set to multiple paths. Use;as a separator between paths; for example,RENV_PATHS_LOCAL=/path/to/sources/v1;/path/to/sources/v2. (#550)Packages installed via e.g.
renv::install("./path/to/package")will now retain the relative path to that package within the lockfile. (#873)Fixed an issue where invalid
configoption values were not properly reported. (#773)renv now supports restoration of packages installed via one of the r-universe repositories.
renv gains the
bioconductor.versionproject setting, used to freeze the version of Bioconductor used in a particular project. When set, this will override any version that might be selected via theBiocManagerpackage. (#864)renv now infers that parameterized R Markdown documents have a dependency on the
shinypackage. In addition, R code included within theparams:list will be parsed for dependencies. (#859)renv now ignores hidden directories during dependency discovery by default. If you want to force a particular hidden directory to be included for discovery, you can use a
.renvignorefile with an explicit inclusion criteria; e.g.!.hidden/.renv now supports the
*releaseremotes specifier for GitHub repositories, for requesting installation of the latest declared release of a package from GitHub. (#792)renv now handles packages stored within the sub-directory of a Git repository better. (#793)
Fixed an issue where
renv::history()would fail to resolve the correct lockfile path if the working directory was changed. (#834)Refined dependency discovery within
glue::glue()expressions.renv now parses packages referenced via the
base_formatfield within an R Markdown document’s YAML header. (#854)Fixed an issue where renv would fail to produce the appropriate binary repository URL for RSPM repositories built using Red Hat Enterprise Linux.
Fixed an issue where
renv::snapshot()could cause the environment name and / or path associated with a Python environment to be omitted from the lockfile. (#843)Fixed an issue where
renv::restore()could fail to restore packages which referred to their source via an explicit path in theSourcefield. (#849)renv no longer requires explicit user consent when used within Singularity containers. (#824, @kiwiroy)
renv now respects the
R_PROFILE_USERenvironment variable, in addition to theuser.profileconfiguration option, when considering whether the user.Rprofileshould be examined for package dependencies. (#821)The renv auto-loader can now be disabled by setting the environment variable
RENV_AUTOLOADER_ENABLED = FALSE. This can be useful if you’d like to explicitly control how a project is loaded, e.g. by callingrenv::load()explicitly.renv::snapshot()gains thereposargument, to be used to force the lockfile to be generated with the requested set of R repositories encoded within.renv now validates that the
reposoption, as used byrenv::snapshot(), is a named vector. (#811)Fixed an issue where renv’s shims, e.g. for
install.packages(), failed to pass along other optional arguments to the shimmed function correctly. (#808)
renv 0.14.0
CRAN release: 2021-07-21
renv now uses
tools::R_user_dir()to resolve the default path to the global renv cache, for R installations 4.0.0 or greater. If the renv cache still exists at the old location, that location will be used instead. This change should only affect brand new installations of renv on newer versions ofR.Fixed an issue with renv tests failing with R (>= 4.2.0).
renv will no longer auto-activate itself within R processes launched via
R CMD INSTALL. This behavior can be controlled if necessary via theRENV_ACTIVATE_PROJECTenvironment variable – set this toTRUEto force the project in the current working directory to be activated, andFALSEto suppress the renv auto-loader altogether. (#804)Added dependency discovery support for R utility scripts identified by a shebang line instead of a file extension. (#801; @klmr)
Fixed an issue where
renv::install("<package>", type = "both")would attempt to install the package from sources, even if the current system did not have the requisite build tools available. (#800)renv::scaffold()gains thesettingsargument, used to create a project scaffolding with some default project options set. (#791)renv now determines the default branch name for packages installed from GitLab without an explicit reference supplied; for example, as in
renv::install("gitlab::<user>/<repo>"). (#795)renv now infers a dependency on the
bslibpackage for R Markdown documents using custom themes. (#790)renv will now prompt users to activate the current project when calling
renv::snapshot()orrenv::restore()from within a project that has not yet been activated. (#777)renv now has improved handling for
gitremotes. (#776; @matthewstrasiotto)renv::restore()gains theexcludeargument, used to exclude a subset of packages during restore. (#746)Fixed an issue where
renv::dependencies()could fail to parse dependencies in calls toglue::glue()that used custom open and close delimiters. (#772)Fixed an issue where
renv::init(bare = TRUE)would unnecessarily scour the project for R package dependencies. (#771)Fixed an issue where renv could fail to install packages located on GitHub within sub-subdirectories. (#759)
renv gains the function
embed(), used to embed a lockfile with an R document (via a call torenv::use()).renv::use()gains the lockfile argument. This can be useful for R Markdown documents and scripts that you’d like to run with the context for a particular lockfile applied.renv::rebuild()gains thetypeparameter, for parity withrenv::install().Fixed an issue where renv could incorrectly copy an incompatible version of an R package from a site library into the project library during install. (#750)
renv::dependencies()can now parse (some) usages ofparsnip::set_engine().renv::dependencies()now has improved handling for piped expressions.Fixed crash during dependency discovery when encountering
box::use()declarations that use a trailing comma, and no longer treat.and..as package names. (@klmr)renv::clean()no longer attempts to clean the system library by default. (#737)Fixed an issue where
install.packages()could fail when used within an renv project to install a package from local sources. (#724)The chunk
renv.ignoreparameter can now be set toFALSE. When set, renv will explicitly parse dependencies from chunks even if other chunk metadata would have told renv to ignore it (e.g. because it was marked witheval=F). (#722)Fixed an issue where chunks with the chunk option
eval=Fwould still be scanned for dependencies. (#421)In interactive sessions,
renv::use_python()will now prompt for the version of Python to be used. Python installations in a set of common locations will be searched. See?renv::use_python()for more details.Fixed an issue where renv would fail to retrieve packages from the archives if the lockfile entry was tagged with a
RemoteShafield.renv::restore()will now prefer restoring packages from the repository named in theRepositoryfield if available. The name is matched against the repository names set in the Rreposoption, or as encoded in the renv lockfile. (#701)renv now supports the discovery of dependencies within interpolated strings as used by the
gluepackage.RENV_CONFIG_EXTERNAL_LIBRARIEScan now be configured to use multiple library paths, delimited by either:,;, or,. (#700)renv gains the configuration option,
exported.functions, controlling which functions and objects are placed on the R search path when renv is attached (e.g. vialibrary(renv)). Set this toNULLto instruct renv not to place any functions on the search path. This helps avoid issues with, for example,renv::load()maskingbase::load(). When set, all usages of renv APIs must be explicitly qualified with therenv::prefix.
renv 0.13.2
CRAN release: 2021-03-30
renv::install("user/repo/subdir with spaces")now works as expected. (#694)renv can now parse package dependencies declared by
targets::tar_option_set(packages = <...>). (#698)renv no longer performs an automatic snapshot following a user-canceled renv action – for example, if
renv::restore()is canceled, the next automatic snapshot will be suppressed. (#697)Added the
vcs.ignore.localproject setting, to control whether the project’srenv/localfolder is added to renv’s VCS ignore file (e.g.renv/.gitignore). (#696)Fixed an issue where renv’s bootstrapping code could inadvertently bootstrap with the wrong version of renv, if the source and binary versions of renv on CRAN were not in sync. (#695)
Fixed an issue where
renv::status()could provide a misleading message for packages which are recorded in the lockfile, but not explicitly required by the project. (#684)
renv 0.13.1
CRAN release: 2021-03-18
renv::clean()gains theactionsargument, allowing the caller to control which specific actions are taken during aclean()operation.renv no longer performs an automatic snapshot after a call to
renv::status(). (#651)Fixed an issue where attempts to transform RSPM repository URLs could fail if the copy of R was installed without a local
CRAN_mirrors.csvfile.Fixed an issue where
renv::init()could fail when passed a relative path to a directory. (#673)Fixed an issue where
renv::dependencies()would miss dependencies in R Markdown YAML headers containing multiple output formats. (#674)renv::install()now better respects theRemotesfield in a projectDESCRIPTIONfile, if available. (#670)RENV_DOWNLOAD_METHODis now treated as an alias forRENV_DOWNLOAD_FILE_METHOD.Fixed an issue where renv would fail to load if the
~/.Rprofileexisted but was an empty file.
renv 0.13.0
CRAN release: 2021-02-24
renv::snapshot()no longer creates anrenv/activate.Rfile in the project folder if one does not already exist. (#655)The
renv::hydrate()function gains theupdateargument, used to control whetherrenv::hydrate()chooses to update packages when invoked. When set toTRUE, if the version of a package installed in the source library is newer than that of the project library, then renv will copy that version of the package into the project library. (#647)The
RENV_PATHS_PREFIX_AUTOenvironment variable can now be set to instruct renv to include an OS-specific component as part of the library and cache paths. This is primarily useful for Linux systems, where one might want to share a global cache with multiple different operating systems. The path component is constructed from theIDandVERSION_CODENAME/VERSION_IDcomponents of the system’s/etc/os-releasefile.renv’s dependency discovery machinery now has preliminary support for packages imported via the box package; e.g.
box::use(dplyr[...]).Multiple cache paths can now be specified, with each cache path separated by either a
;or:. This can be useful when you’d like to use multiple package caches within the same project; for example, because you’d like to share a read-only cache with a set of projects. (#653, @vandenman)Fixed an issue where renv could fail to discover dependencies in directories with very large
.gitignoreor.renvignorefiles. (#652)renv gains a new configuration option,
install.shortcuts. When enabled, if renv discovers that a package to be installed is already available in the user or site libraries, renv will instead install a copy of that package into the project library. (#636)renv gains a new function,
renv::use(), used to download, install, and load a set of packages directly within an R script.renv::use()can make it easier to share a standalone R script, with the packages required to install that script embedded directly in the script. It is inspired in part by the groundhog package.renv::install(".")can now be used to install a package from sources within the current working directory. (#634)Fixed an issue where
renv::update()could fail if a package installed from GitHub was missing theRemoteHostfield in its DESCRIPTION file. (#632)renv now has support for custom project profiles. Profiles can be used to activate different sets of project libraries + lockfiles for different workflows in a given project. See
vignette("profiles", package = "renv")for more details.Fixed an issue where attempts to initialize an renv project in a path containing non-ASCII characters could fail on Windows. (#629)
Fixed an issue where
renv::install("<package>")could fail if renv chose to install the package from MRAN rather than from one of the active package repositories. (#627)renv again defaults to using the project’s
renv/stagingfolder for staged / transactional installs. Use theRENV_PATHS_LIBRARY_STAGINGenvironment variable if more granular control over the staging library path is required. This fixes issues on Windows with creating junction points to the global package cache on Windows. (#584)renv no longer skips downloading a requested source package if an existing cached download exists and appears to be valid. This should help avoid issues when attempting to install a package whose associated tarball has changed remotely. (#504)
During bootstrap, renv will now attempt to download and unpack a binary copy of renv if available from the specified package repositories.
renv now always attempts to bootstrap itself from the R Project’s Cloud package repository, as a fallback in case no other repository is available. (#613)
renv::rebuild(<package>)now uses the latest-available version of the requested package(s) if those packages are not currently installed.Fixed an issue where
renv::restore(library = "/path/to/lib")would fail to restore packages, if those packages were already installed on the active library paths (as reported by.libPaths()). (#612)renv::snapshot()gains thereprexargument. Set this toTRUEif you’d like to embed an renv lockfile as part of a reproducible example, as generated by thereprexpackage.renv::status()now reports packages that are referenced in a project’s scripts, but are neither installed in the project library nor recorded in the lockfile. (#588)Fixed an issue where package installation could fail if the
configure.varsoption was set to be a named character, rather than a named list. (#609)
renv 0.12.4
CRAN release: 2021-01-07
renv now invalidates the available packages cache if the
https_proxyenvironment variable changes. (#579)renv::install(<pkg>)will now install the latest-available version of that package from local sources, if that package is available and newer than any package available on the active package repositories. (#591)The configuration option
startup.quiethas been added, allowing one to control whether renv will display the typical startup banner when a project is loaded.renv now better handles being unloaded and reloaded within the same R session. In particular, warnings related to a corrupted lazy-load database should no longer occur. (#600)
renv no longer reinstalls packages that are already installed and up-to-date in bare calls to
renv::install().renv now uses the R temporary directory for staging, when performing transactional restores / installs. If you need to control the path used for staged installs, please set the
RENV_PATHS_LIBRARY_STAGINGenvironment variable.The
install.verboseconfiguration option has been added. When set toTRUE, renv will stream the output generated by R when performing a package installation. This can be helpful in some cases when diagnosing a failed restore / install. (#330)Fixed an issue where renv could fail to parse R Markdown chunk headers with an empty label. (#598)
The environment variable
RENV_PATHS_LIBRARY_ROOT_ASIScan now be used to control whether the project name should be used as-is when forming the library path within theRENV_PATHS_LIBRARY_ROOTfolder. Set this to"TRUE"if you would prefer renv did not append a unique identifier to your project’s library path. (#593)Fixed an issue where GitLab references were not URL encoded. (#590)
renv no longer emits warnings when parsing multi-mode R files that make use of re-used knitr chunks (those specified as
<<label>>). (#586)The library used for staged installs can now be configured via the
RENV_PATHS_LIBRARY_STAGINGenvironment variable. (#584)Fixed an issue where bootstrapping an older version of renv could fail if the R repositories had not been appropriately set.
renv 0.12.3
CRAN release: 2020-11-25
Fixed an issue where
renv::dependencies()could give an error if called with apathargument of length > 1.renv::restore()gains therebuildargument, allowing users to control whether packages should be rebuilt onrestore()rather than installed via links or copies from the cache, or other sources providing already-installed packages.renv will now attempt to bootstrap itself from CRAN, in addition to any repositories declared via
getOption("repos"). If you’d prefer to disable this behavior, you can setoptions(renv.bootstrap.repos = character()).The renv setting
r.versionhas been added. This can be set if you’d like to associate a particular project with a specific version of R, independent of the version of R actually used when subsequent lockfiles are created viarenv::snapshot(). For example, settingrenv::settings$r.version("4.0")will ensure that R version"4.0"is encoded in the lockfile for future calls torenv::snapshot()in a project. (#254)renv::dependencies()now detects the usage of R packages within dotfiles; e.g. the project.Rprofile. (#569)renv::status()gains thecacheargument, used to control whetherrenv::status()also performs diagnostics on the global package cache. (#570)Fixed an issue where
renv::status()would make an un-necessary call torenv::dependencies(). (#570)Fixed an issue where
renv::install("bioc::<package>", rebuild = TRUE)would fail to install the requested package. (#565)Fixed an issue where the repository name for a package installed from an R package repository was sometimes incorrect. (#402)
When
RENV_PATHS_LIBRARY_ROOTis set, renv will now disambiguate library paths based on a hash of the project’s path. (#564)
renv 0.12.2
CRAN release: 2020-11-04
- renv no longer errs when running tests with
_R_CHECK_SUGGESTS_ONLY_=false.
renv 0.12.1
CRAN release: 2020-11-02
renv now ensures all of its dependencies are loaded eagerly when running tests, to avoid issues with missing + lazily-loaded packages.
renv::snapshot()now accepts library paths specified with a relative path. (#562)renv::snapshot()no longer excludes the project itself, forRpackage projects that use golem. (#538)The renv configuration option
cache.symlinkscan now be used to control whether renv used symlinks into the cache, as opposed to full package copies. Please see?renv::configfor more details. (#556)renv::snapshot()gains thepackagesargument, to be used when creating a lockfile that captures a specific set of packages and their dependencies. renv will use the currently-installed versions of those packages when determining the package records to be written to the lockfile. (#554)renv::dependencies()now accepts an R function as the first argument, for finding the packages used by a particular function. Currently, package usages must be prefixed with::to be detected. (#554)renv::record(<package>)now ensures that the latest-available version of that package is recorded in the lockfile. Previously, a package record without any specified version was added instead. For existing records without a recorded version, the latest-available version on the package repositories will be used duringrestore()instead. (#540)renv now reads the default branch tagged for repositories created on GitHub, ensuring that calls of the form
renv::install("<user>/<repo>")resolve to the declared default branch, rather than always defaulting to"master". (#557)renv now only installs packages from sources if it detects that build tools are available. This determination is done by checking whether
makeis available on thePATH. (#552)Warnings related to unknown sources can now be suppressed by setting
options(renv.warnings.unknown_sources = FALSE). (#546)renv now ignores chunks with the parameter
exercise=TRUEset, under the assumption that such chunks might contain errors and so otherwise be un-parsable.renv now warns if sandbox generation takes a long time (> 30 seconds).
renv now provides an optional locking mechanism, to help minimize the chance of interprocess conflicts when multiple R processes need to use the same renv project. The option is currently disabled by default; it can be enabled by setting
options(renv.config.locking.enabled = TRUE)in an appropriate R startup file. (#525)
renv 0.12.0
CRAN release: 2020-08-28
renv now uses R’s internal tar implementation by default on Windows. This is done to avoid issues that may occur when a version of
tar.exeon thePATHexists, but does not accept Windows-style paths. TheTARenvironment variable can be set if one needs to explicitly force the use of a particulartar.exeexecutable. (#521)renv now prepends
renv (<version>)to the user agent string. This should help ensure that package binaries are located when installing packages from RSPM outside of RStudio. (#520)renv now uses a task callback to detect mutations to the project library when the
auto.snapshotconfiguration option is enabled. This will help ensure that automatic snapshots occur when packages are installed via a mechanism not explicitly understood by renv. (#501)renv now treats the user + site libraries as package sources during a restore. If renv sees that a package already installed in one of these libraries is compatible with the record requested via
renv::install()orrenv::restore(), that copy of the package will be copied and used. (#492)renv now performs a lighter-weight check as to whether the project lockfile is synchronized with the project library on load. The default value for the
synchronized.checkconfig option has been changed back toTRUE. (#496)renv now handles the
remotessyntax for installing packages lying within the sub-directory of a GitHub repository; that is,renv::install("user/repo/subdir")should work as expected. (#497)Fixed an issue where renv did not construct the correct URL for packages to be installed from Bitbucket remotes. (#494)
Fixed an issue where the
RENV_PATHS_PREFIXenvironment variable was inappropriately normalized when renv was loaded. (#465)
renv 0.11.0
CRAN release: 2020-06-26
Fixed an issue where
renv::install(..., type = "binary")would still attempt to install packages from sources in some cases. (#461)renv now always writes
renv/.gitignore, to ensure that the appropriate directories are ignored for projects which initializegitafter renv itself is initialized. (#462)R Markdown documents with the
.Rmarkdownfile extension are now parsed for dependencies.Fixed an issue where setting the
external.librariesconfiguration option would trigger a warning. (#452)Improved handling of unicode paths on Windows. (#451)
renv::snapshot(project = <path>)now properly respects.gitignore/.renvignorefiles, even when that project has not yet been explicitly initialized yet. (#439)The default value of the
synchronized.checkoption has been changed from TRUE to FALSE.Fixed an issue where packages downloaded from Bitbucket and GitLab did not record the associated commit hash.
Fixed an issue where attempting to install packages from GitLab could fail to install the correct version of the package. (#436)
renv::snapshot()now preserves records in a lockfile that are only available for a different operating system. This should make it easier to share lockfiles that make use of platform-specific packages. (#419)renv better handles files that are removed during an invocation to
renv::dependencies(). (#429)The configuration option
install.stagedhas been renamed toinstall.transactional, to better reflect its purpose.install.stagedremains supported as a deprecated alias.Fixed an issue where renv could fail to parse non-ASCII content on Windows. (#421)
renv::update()gains theexcludeargument, useful in cases where one would like to update all packages used in a project, except for a small subset of excluded packages. (#425)renv::update()now respects the projectignored.packagessetting. (#425)Fixed an issue where RSPM binary URL transformations could fail for Ubuntu Trusty. (#423)
renv now records the
OS_typereported in a package’sDESCRIPTIONfile (if any), and ignores packages incompatible with the current operating system during restore. (#394)
renv 0.10.0
CRAN release: 2020-05-06
renv::install()gains thetypeargument, used to control whether renv should attempt to install packages from sources ("source") or using binaries ("binary").renv now knows how to find and activate Rtools40, for R 4.0.0 installations on Windows.
The
RENV_PATHS_PREFIXenvironment variable can now be used to prepend an optional path component to the project library and global cache paths. This is primarily useful for users who want to share the renv cache across multiple operating systems on Linux, but need to disambigutate these paths according to the operating system in use. See?renv::pathsfor more details.Fixed an issue where
renv::install()could fail for packages from GitHub whose DESCRIPTION files contained Windows-style line endings. (#408)renv::update()now also checks and updates any Bioconductor packages used within a project. (#392)renv now properly parses negated entries within a
.gitignore; e.g.!script.Rwill indicate that renv should includescript.Rwhen parsing dependencies. (#403)Fixed an issue where packages which had only binaries available on a package repository were not detected as being from a package repository. (#402)
Fixed an issue where calls of the form
p_load(char = <vctr>)caused a failure when enumerating dependencies. (#401)Fixed an issue where
renv::install()could fail when multiple versions of a package are available from a single repository, but some versions of those packages are incompatible with the current version of R. (#252)Fixed an issue where downloads could fail when the associated pre-flight HEAD request failed as well. (#390)
Fixed an issue where empty records within a DESCRIPTION file could cause
renv::dependencies()to fail. (#382)renv will now download binaries of older packages from MRAN when possible.
renv will now attempt to re-generate the system library sandbox if it is deleted while a session is active. (#361)
Fixed an issue where Python packages referenced using
reticulate::import()were incorrectly tagged as R package dependencies. Similarly, renv now only considers calls tomodules::import()if those calls occur within a call tomodules::module(). (#359)renv::scaffold()now also generates a lockfile when invoked. (#351)The argument
confirmhas been renamed topromptin all places where it is used.confirmremains supported for backwards compatibility, but is no longer explicitly documented. (#347)The continuous integration renv vignette now also contains a template for using renv together with GitLab CI. (#348, @artemklevtsov)
renv now properly resets the session library paths when calling
renv::deactivate()from within RStudio. (#219)renv::init()now restores the associated project library when called in a project containing a lockfile but no project library nor any pre-existing project infrastructure.Fixed an issue on Windows where attempts to download packages from package repositories referenced with a
file://scheme could fail.The configuration option
dependency.errorshas been added, controlling how errors are handled during dependency enumeration. This is used, for example, when enumerating dependencies during a call torenv::snapshot(). By default, errors are reported, and (for interactive sessions) the user is prompted to continue. (#342)renv::dependencies()gains two new arguments: theprogressargument controls whether renv reports progress while enumerating dependencies, anderrorscontrols how renv handles and reports errors encountered during dependency discovery. Thequietargument is now soft-deprecated, but continues to be supported for backwards compatibility. Specifyingquiet = TRUEis equivalent to specifyingprogress = FALSEanderrors = "ignored". Please see the documentation in?dependenciesfor more details. (#342)The environment variable
RENV_PATHS_LIBRARY_ROOTcan now be set, to instruct renv to use a particular directory as a host for any project libraries that are used by renv. This can be useful for certain cases where it is cumbersome to include the project library within the project itself; for example, when developing an R package. (#345)The code used to bootstrap renv (that is, the code used to install renv into a project) has been overhauled. (#344)
renv no longer unsets an error handler set within the user profile when loading a project. (#343)
renv gains the “explicit” snapshot type, wherein only packages explicitly listed as dependencies within the project
DESCRIPTIONfile (and those package’s transitive dependencies) will enter the lockfile whenrenv::snapshot()is called. (#338)renv will now transform RSPM source URLs into binary URLs as appropriate, allowing renv to use RSPM’s binary repositories during restore. See
?configfor more details. (#124)renv will now infer a dependency on
hexbinin projects that make use of theggplot2::geom_hex()function.renv now tries to place Rtools on the PATH when a package is installed with the
install.packages()hook active. (#335)
renv 0.9.3
CRAN release: 2020-02-10
Fixed an issue where attempts to specify
RENV_PATHS_RTOOLSwould be ignored by renv. (#335)Fixed an issue where downloads could fail when using the
wininetdownloader, typically with a message of the form “InternetOpenUrl failed: ‘The requested header was not found’”.renv better handles projects containing special characters on Windows. (#334)
renv better handles unnamed repositories. (#333)
renv gains the config option
hydrate.libpaths, allowing one to control the library paths used by default forrenv::hydrate(). (#329)renv::hydrate()gains thesourcesargument, used to control the library paths used by renv when hydrating a project. (#329)renv now sandboxes the system library by default on Windows.
renv now validates that the Xcode license has been accepted before attempting to install R packages from sources. (#296)
The R option
renv.download.overridecan now be used to override the machinery used by renv when downloading files. For example, settingoptions(renv.download.override = utils::download.file)would instruct renv to use R’s own downloader when downloading files from the internet. This can be useful when configuration ofcurlis challenging or intractable in your environment, or you’ve already configured the base R downloader suitably.renv::use_python("~/path/to/python")now works as expected.renv now properly expands
R_LIBS_SITEandR_LIBS_USERwhen set within a startup.Renvironfile. (#318)The
renv.download.headersoption can now be used to provide arbitrary HTTP headers when downloading files. See the Authentication section invignette("renv")for more details. (#307)renv gains the project setting
package.dependency.fields, for controlling which fields in an R package’sDESCRIPTIONfile are examined when discovering recursive package dependencies. This can be useful when you’d like to instruct renv to track, for example, theSuggestsdependencies of the packages used in your project. (#315)renv now better handles repositories referenced using file URIs.
Packages installed from GitHub using
renv::install()will now also haveGithub*fields added, in addition to the defaultRemote*fields. This should help fix issues when attempting to deploy projects to RStudio Connect requiring packages installed by renv. (#397)renv now prefers using a RemoteType field (if any) when attempting to determine a package’s source. (#306)
renv gains a new function
renv::scaffold(), for generating renv project infrastructure without explicitly loading the project. (#303)renv now updates its local
.gitignorefile, when part of a git repository whose git root lives in a parent directory. (#300)
renv 0.9.0
CRAN release: 2019-12-05
renv gains a new function
renv::record(), for recording new packages within an existing lockfile. This can be useful when one or more of the recorded packages need to be modified for some reason.An empty
.renvignoreno longer erroneously ignores all files within a directory. (#286)renv now warns if the version of renv loaded within a project does not match the version declared within the renv autoloader. (#285)
renv gains a new function
renv::run(), for running R scripts within a particular project’s context inside an R subprocess. (#126)The algorithm used by renv for hashing packages has changed. Consider using
renv::rehash()to migrate packages from the old renv cache to the new renv cache.renv::status()now reports packages which are referenced in your project code, but are not currently installed. (#271)renv is now able to restore packages with a recorded URL remote. (#272)
renv::dependencies()can now parse R package dependencies used as custom site generator in an Rmd yaml header. (#269, @cderv)renv now properly respects a downloader requested by the environment variable
RENV_DOWNLOAD_FILE_METHOD.renv no longer sources the user profile (normally located at
~/.Rprofile) by default. If you desire this behavior, you can opt-in by settingRENV_CONFIG_USER_PROFILE = TRUE; e.g. within your project or user.Renvironfile. (#261)renv::restore()gains thepackagesargument, to be used to restore a subset of packages recorded within the lockfile. (#260)renv now tries harder to preserve the existing structure in infrastructure files (e.g. the project
.Rprofile) that it modifies. (#259)renv now warns if any Bioconductor packages used in the project appear to be from a different Bioconductor release than the one currently active and stored in the lockfile. (#244)
renv now normalizes any paths set in the
RENV_PATHS_*family of environment variables when renv is loaded.Fixed an issue where renv would not properly clean up after a failed attempt to call
Sys.junction(). (#251)Fixed an issue where renv would, in some cases, copy rather than link from the package cache when the library path had been customized with the
RENV_PATHS_LIBRARYenvironment variable. (#245)The method renv uses when copying directories can now be customized. When copying directories, renv now by default uses
robocopyon Windows, andcpon Unix. This should improve robustness when attempting to copy files in some contexts; e.g. when copying across network shares.renv now tracks the version of Bioconductor used within a project (if applicable), and uses that when retrieving the set of repositories to be used during
renv::restore().renv::dependencies()can now parse R package dependencies declared and used by themodulespackage. (#238, @labriola)Fixed an issue where
renv::restore()could fail in Docker environments, usually with an error message like ‘Invalid cross-device link’. (#243)renv::install()disables staged package install when running with the Windows Subsystem for Linux. (#239)
renv 0.8.3
CRAN release: 2019-11-11
renv::dependencies()gains a new argumentdev, indicating whether development dependencies should also be included in the set of discovered package dependencies. By default, only runtime dependencies will be reported.renv has gained the function
renv::diagnostics(), which can occasionally be useful in understanding and diagnosing renv (mis)behaviors.renv::equip()can now be used on macOS to install the R LLVM toolchain normally used when compiling packages from source. renv will also use this toolchain as appropriate when building packages from source.renv::install()now provides a custom Makevars when building packages on macOS with Apple Clang, to avoid issues due to the use of ‘-fopenmp’ during compilation.renv::install()now respects explicit version requests when discovered in a project’s DESCRIPTION file. (#233)Fixed an issue where
renv:::actions()would fail to report any actions if the project lockfile was empty. (#232)When using renv for R package development, renv will no longer attempt to write the package being developed to the lockfile. (#231)
Fixes for checks run on CRAN.
renv will now search for Rtools in more locations. (#225)
renv::load()now ensures that the version of renv associated with the loaded project is loaded when possible. In addition, experimental support for switching between projects withrenv::load()has been implemented. (#229)renv::dependencies()no longer treats folders named with the extension.Rmdas though they were regular files. (#228)It is now possible to install source packages contained within
.ziparchives usingrenv::install().Fixed an issue where attempts to call
renv::restore()with the path to the lockfile explicitly provided would fail. (#227)