Releases: rstudio/renv
renv 1.0.9
renv 1.0.8
-
renv
now infers a dependency on theragg
package when theragg_png
device
is used in R Markdown / Quarto documents, for documents using the code
knitr::opts_chunk$set(dev = "ragg_png")
. (#1985) -
renv
now automatically generates a lockfile when loading a project containing
amanifest.json
file (typical for application bundles published to Posit Connect).
(#1980, @toph-allen) -
renv::install()
now errs if an incompatibletype
argument is provided. -
renv::checkout()
now also checks out the version ofrenv
available
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'sDESCRIPTION
file.
(#1970) -
Fixed an issue where
renv::checkout()
omitted some fields from lockfile
records when usingactions = c("snapshot", "restore")
. (#1969) -
renv
gains 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) -
renv
now preservesRemote
fields 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) -
renv
now emits clickable hyperlinks for runnable code snippets and help,
for front-ends which support theide:run
andide:help
ANSI 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 thetransactional
argument, which can be
used to control whetherrenv
will allow successfully-installed
packages remain in the project library even if a package fails
to install during a later step. (#1109) -
renv
now infers a dependency on thexml2
package for projects
using thetestthat::JunitReporter
for 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 thetype
andrebuild
arguments topak
whenoptions(renv.config.pak.enabled = TRUE)
is set. (#1924) -
renv
now infers a dependency on thesvglite
package if it detects
calls of the formggsave(filename = "path.svg")
. (#1930) -
renv
now supports setting of GitHub authentication credentials via
any ofGITHUB_TOKEN
,GITHUB_PAT
, andGH_TOKEN
. (#1937) -
renv
now also passes any custom headers available to
utils::available.packages()
during bootstrap. (#1942) -
Fixed an issue where
renv
could fail during installation of packages
stored within repository sub-directories, if that repository also
contained a top-level DESCRIPTION file. (#1941) -
renv
now normalizes lockfile entries for Bioconductor packages installed
viapak::pkg_install()
, to help prevent spurious diffs being produced
viarenv::status()
. (#1920) -
renv::install()
now respects theprompt
parameter whenpak
is enabled,
as viaoptions(renv.config.pak.enabled = TRUE)
. (#1907) -
Fixed an issue with
renv
'spak
integration whererenv
could install the
wrong version of a GitHub package during restore if
options(renv.config.pak.enabled = TRUE)
was set. (#1883) -
renv
no 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.lock
against a default or custom schema. (#1889)
renv 1.0.7
- Fixed an issue where
renv
's activate script failed to report version
conflict errors when starting up. (#1874)
renv 1.0.6
-
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 thepak
package, e.g. viapak::pkg_install("cran::<package>")
. -
Fixed an issue where
renv
could incorrectly prompt the user to record
a version ofrenv
installed 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 thelock
argument, which can be used to
instructrenv
to automatically update the lockfile after the requested
packages have been updated. (#1849) -
Fixed an issue where
renv
could 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) -
renv
now uses a platform-specific prefix on Linux for library and
cache paths by default with R (>= 4.4.0). This is equivalent to setting
RENV_PATHS_PREFIX_AUTO = TRUE
. If necessary, this behavior can be
disabled by settingRENV_PATHS_PREFIX_AUTO = FALSE
in an appropriate
R startup file. (#1211)
renv 1.0.5
-
renv
now only writes a.renvignore
file into the cache directory
if the cache appears to be part of the current project. -
renv
now 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
-
renv::install()
gains thelock
argument. WhenTRUE
, the project
lockfile will be updated after the requested packages have been
successfully installed. (#1811) -
renv
now supports the use of GitHub Enterprise servers with the
gitcreds
package 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 theprofile
argument, allowing one to
explicitly load a specific profile associated with anrenv
project.
Seevignette("profiles", package = "renv")
or
https://rstudio.github.io/renv/articles/profiles.html
for more details. -
renv::dependencies()
no longer includesR
dependency versions
declared from aDESCRIPTION
file in its output. (#1806) -
Fixed an issue where
renv
could fail to infer dependencies from
R Markdown code chunks using engine 'R' (upper-case) rather than
'r' (lower-case). (#1803) -
Fixed an issue where
renv
did not report out-of-sync packages when
one or more packages used in the project were not installed. (#1788) -
Fixed an issue where
renv
could 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's
DESCRIPTION
file, if any. (#1522) -
renv::embed()
now supports Quarto Markdown (.qmd
) files. (#1700) -
renv now sets the
R_INSTALL_TAR
environment variable to match the default
tar
executable (if any) when installing packages. (#1724) -
renv now uses
--ssl-revoke-best-effort
by default when downloading files
usingcurl
on 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'sDESCRIPTION
file, if any. -
Calling
renv::activate()
without explicitly providing theprofile
argument
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
renv
would try to prompt for the installation of
BiocManager
when activating a project using Bioconductor. (#1754) -
Fixed an issue where directories containing a large number of files could
causerenv
to 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.renv
now 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
-
Fixed an issue where
renv
could warn the project appeared to be out-of-sync
when using packages installed without an explicit source recorded. (#1683) -
renv::install()
gains theexclude
argument, 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 inrenv::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
.Rprofile
to execute
before the project had been loaded in RStudio. (#1650) -
renv::snapshot()
andrenv::status()
gain thedev
argument. 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
-
renv now parses package
NAMESPACE
files 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
-
Fixed an issue where authentication headers could be duplicated when
using thelibcurl
download method. (#1605) -
renv::use()
now defaults to settingisolate = TRUE
whensandbox = 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.verbose
R 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 theload
argument, 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 theirDESCRIPTION
files 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_DIAGNOSTICS
environment 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 theprompt
parameter 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_EFFORT
when using an externalcurl.exe
binary to download files. (#1624)
renv 1.0.0
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.
Theactions
argument 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 aclean
argument: whenTRUE
it 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.url
in?config
for 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, while
install()
continues to install them (#1019).Suggested
packages listed in
DESCRIPTION
files 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 form
bioc::<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 thePATH
environment variable
(#1095). -
renv::restore()
can now usepak::pkg_install()
to install packages
whenpak
integration is enabled. SetRENV_CONFIG_PAK_ENABLED = TRUE
in your project's.Renviron
if 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 deleting
renv.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.lock
has somehow become
corrupted (#1027).