NEWS.md
setupOff
and setLibPaths
enhanced to be fully functioning in a wide diversity of cases.install = "force"
in Require
, now only the user-specified packages are forced to be installed; the rest are installed if required, mimicking install.packages
(HEAD)
is now more robust as a way to keep a package up to date..downloadFileMasterMainAuth
, messageVerbose
, messageDF
as they were deemed useful enough for other packages.available.packagesCached()
object. Now, catches this condition and refreshes available.packages()
install.packages
, i.e., first one first.Install
did not have an install
argument; this has now been introduced, allowing the (most likely) use case of Install(pkg, install = "force")
Install
more often than Require(..., require = FALSE)
for simplicity..libPaths()
were treated incorrectly; they are now all respected.repos
has multiple, non-binary CRAN-like repositories, when there is also at least one binary repository supplied e.g., the rstudio package manager, i.e., there are at least 3 repositories supplied, 1 of which is binary.Require
. It now downloads and builds Archive
and GitHub
packages prior to installation, then installs all packages (CRAN
, Archive
, GitHub
, MRAN
on Windows) with one install.packages
call (Linux-alikes) or up to two install.packages
calls (binary and source), allowing efficient parallel installs. This results in very fast installs for all combinations of packages. new options("Require.offlineMode")
can be set to FALSE
to stop Require
and pkgDep
from checking the internet. This will fail, unless the cached packages are available locally (i.e., it was run once with all packages installed previously). If they are, then they will be installed without needing the internet. This option will also be set automatically on the first attempt to get a file from the internet, which fails, triggering a test of the internet. If that fails, then the option will be set to FALSE
until next call to Require
or pkgDep
when it will be reset. This is experimental still.(HEAD)
to keep a package “up to date” with the HEAD of a GitHub branch. The behaviour still uses version numbering, so will not update based on SHA, but if the HEAD is ahead of the locally installed package and the (HEAD)
is specified, then it will update. Specifically, use this instead of a version number, e.g., "PredictiveEcology/Require@development (HEAD)"
modifyList2
now follows modifyList
by adding the keep.null
argument.setdiffNamed
will compare 2 named lists or vectors and keep on those elements that are in the first list (or vector), keeping in mind the name as well as the element.message
calls now messageVerbose
, so verbosity can be fully controlled with the argument verbose
or options("Require.verbose")
. See ?RequireOptions
.options(Require.RPackageCache = FALSE)
(or environment variable "R_REQUIRE_PKGCACHE"
), then no cache folder will be created; previously a nearly empty folder was created by default. See ?RequireOptions
Require.persistentPkgEnv
as it was deemed superfluous.Install
, which is Require(..., require = FALSE)
(HEAD)
has now been tested for CRAN repositories and works as expected.crancache
if the user sets options(Require.useCranCache = TRUE)
. This is experimental and is still being tested.clearRequirePackageCache
, for clearing the package cache.available.packages
, pkgDep
, GitHubSHA
) will be refreshed (purged) every 1 hour.MRAN
package installs explicitly (instead of just “Archive”)pkgDep
was using local DESCRIPTION
file to establish package dependencies for a package, if it was available. When the local package is ahead of CRAN (a developer’s case), then this is desirable. But, when the local installed version is behind CRAN (a common user’s case), then this is not desirable. pkgDep
now uses CRAN’s version (using available.packages
) as developers can handle this situation on their own.defaultCacheDir
, which would default to runneradmin
under some conditions and did not allow installing packages due to permissions.pkgSnapshot
examples brought up to present usage & simplifiedpkgSnapshot
now uses a default filename that is an option Require.packageVersionFile
.Require
can now accept packageVersionFile = TRUE
, meaning use the package version file that is set in the Require.packageVersionFile
option.sourcePkgs()
, which tend to occur when R packages require idiosyncratic system dependencies) cache the binary version and reuse that on the same system with subsequent re-installs.pkgDep
was misidentifying the correct package dependencies. This would manifest when a user had a version of package “A” installed as well as all its dependencies, e.g., “B”. When the user updated “A” to a new version that required a new version of “B”, it would not correctly identify the new dependency requirement, and not update “B”, causing “A” update to fail. This is fixed.verbose
argument is now widespread, with -1, 0, 1, 2 all valid and correctly inherited values. See argument description in e.g., ?Require
The Require
argument, require
, can now be a character string, indicating which packages should be attached via require
Now can use GITHUB_PAT
environment variable, if set, when it accesses GitHub.com repositories (files or entire repository)
Attempt to capture and correct cases where GitHub.com branches are incorrectly labelled master
instead of main
(or vice versa)
much quieter messaging by default (can increase with verbose = 1)
require
argument in Require
can now be a character vector indicating which packages should be attached, not just installed. Note: by default, all packages that are passed to packages
are attached if require = TRUE
much faster installations:
can use pak package under the hood when options(“Require.usepak” = TRUE), though there are still many cases that pak cannot deal with. Users should try and determine if this option delivers as expected. pak installs tend to be slightly faster if they work correctly.
binary package caching is turned in by default in a user-specific standard directory, making repeat installations (on same system, or shared drive systems) much faster.
MRAN installs for Windows are now much more robust under many conditions.
archived packages (ie no longer on CRAN) will now be found and installed (latest available version)
more robust dependency identification even for archived or older packages or package versions (including their dependencies)
MRAN binaries will be used in MacOSX.
improved installation of older packages (e.g. when dependencies are removed from CRAN, or source versions can’t be easily compiled)
several other minor improvements in package dependency resolution and installation.
normPath()
.install.packages
when options(Ncpus = XX)
where XX is a number > 1. Some packages are skipped. Require
now captures this and attempts to install the ones that did not get correctly installed.install.packages
–> much fasterinstallGithubPackage
instead of remotes::install_github
install.packages
directlyremotes
Require
would silently fail to install a GitHub package if there was a warning during the installation. These warnings are now correctly captured, without stopping the installation.Remotes
field for a package that was in Suggests
(in its DESCRIPTION file). It would install this Remotes
package even though it was only in Suggests
repos
argument to Require
. It was not correctly using. Thanks to @CeresBarros for identifying issue #30repos
argument not correctly passed into doInstalls
from Require
. This meant that installs would not respect a user supplied repos, but would use the options("repos")
instead.extractPkgNames
now allows GitHub packages that have the repository omitted, i.e., they only have @
. This is useful if there is a default expectation for a github repositoryoldrel
) and newer are supported.setup
: new function for creating a new project. See readme.md
setLibPath
and package caching (via options("RPackageCache")
) now automatically create and use a subfolder of user-provided path with the R major & minor version number (as with normal R behaviour) to allow multiple R versions to coexist on the same machine.setLibPaths
gains a new argument, updateRprofile
, which allows a user’s changes to .libPaths()
to persist through an R restart. Set to getOption("Require.updateRprofile", FALSE)
, at startparallel
Require
would use the REMOTES: entry. But since that means there is no minimum package version, and Require
does not automatically install a package that is not violating a minimum version number, it would not install anything. Now, it harmonizes the 2 entries for a given package, and uses both the minimum version number and the git branch as the potential source to find that version number.master
or main
branches to be installed from GitHub, without needing to specify (#26)setup()
modifyList2
, a generalization of utils::modifyList
for >2 lists. Also, can handle NULL lists.detachAll
now unloads reverse depends of the depends, if they are loadedpackageVersion.txt
fileLibPaths
from packageVersion.txt
file, if the second (or more) LibPath
is full of base packages.install.packages
(argument "av2" is missing, with no default
) on R-devel for Windows (on Sept 09, 2020). May be transient.source
on Windows. Fixed.pkgSnapshot
, meaning that a new system can be built with exact versions and SHAs of GitHub packages.options("Require.RPackageCache" = "someLocalDir")
is set to a local folder. Currently defaults to NULL, meaning no local cache.Require
and pkgSnapshot
can now understand and work with GitHub SHAs and thus packages installed from GitHub, e.g., Require("PredictiveEcology/Require@development")
will install the development version. When using pkgSnapshot
, the exact SHA will be used to restore that package at the exact version with Require(packageVersionFile = "packageVersions.txt")
.setLibPaths
, it is possible to create a version conflict. base::require
will error if the version in the .libPaths()
is older than the version whose namespace is already loaded. To accommodate this, there is a check for this error, and if the newer version (that is already loaded) does not violate the Require('package (versionSpecification)')
, then it will install the newer version. If it does violate the version specification, it will error cleanly with a message describing the possible solutions.detachAll
that attempts to detach and unload packages and all their dependencies, in reverse topological order.pkgDep
and pkgDepTopoSort
pkgDepAlt
which is an alternative to pkgDep
, yet easier to maintain and still experimental. It is not yet the workhorse inside Require
, but it may become that.Error: invalid version specification ' 3.3-13'
reproducible
to Require
, including pkgDep
, pkgDepTopoSort
.pkgDep
did not correctly resolve multiple instances of the same package, each with different minimum version numbering. Now it reports minimum version required for all package dependencies.base::available.packages
for old Mac machines and R versionsRequire
(and helpers) which will be removed from package reproducible
Require
is run, the result will be the same