CRAN release: 2022-06-27
Outdated and missing dependencies are installed using pak if installed. If not, the remotes package is used if installed. Otherwise
install.packages()is used as a last resort but this method does not support Remotes fields.
attachargument set to
TRUEby default (#209). If set to
load_all()creates a new namespace but doesn’t create a package environment on the search path. In this case, it is more similar to
Improved the way help pages are displayed in RStudio. This makes the behaviour within and outside RStudio consistent and fixes issues with Rd macros (#120).
unregister()is now exported. This is a gentler version of
unload()which removes the package from the search path, unregisters methods, and unregisters the namespace. However it doesn’t try to unload the namespace or its DLL so that dangling references keep working.
onLoadhooks are now run after exports have been populated. This allows the hook to use exported functions.
The loaded namespace is now locked just before user
onLoadhooks are run. This better reproduced the namespace sealing behaviour of regular loading.
The package environment environment is now locked as well before both the user and package
onAttachhooks are run.
Unknown Rd macros no longer trigger a warning when building the package topic index (#119).
load_all(compile = TRUE)now forces a full recompilation (#93).
rstudioapi is no longer a hard dependency of pkgload (#187).
Errors thrown in user hooks are now demoted to a warning condition. Previously they were demoted using
try(), making it harder to debug them.
load_all()correctly re-loads modified translations, avoiding the usual gettext behaviour.
CRAN release: 2021-11-30
Lionel Henry is now the maintainer.
load_all()automatically registers package translations, if found.
CRAN release: 2021-10-13
pkgload now forces all bindings on unload. This fixes errors and inconsistencies when dangling references force lazy bindings after unload or reload.
CRAN release: 2021-04-06
unload()no longer unregisters methods for generics of the package being unloaded. This way dangling references to generics defined in the stale namespace still work as expected (r-lib/vctrs#1341).
pkgbuilddependency has been moved to
Suggests, as it is only needed for packages with compiled code.
unload()no longer warns when it can’t unload a namespace.
CRAN release: 2021-02-23
Fix test failure in R 4.1 with regards to S4 method registration
load_all()now preserves existing namespaces in working order. In particular, it doesn’t unload the package’s shared library and keeps it loaded instead. When reloading, a copy of the SO for the new namespace is loaded from a temporary location. These temporary SOs are only unloaded on GC and deleted from their temporary location via a weak reference attached to the namespace.
This mechanism ensures that lingering references to the namespace keep working as expected. Consequently the namespace propagation routine that was added to pkgload as a workaround has been removed.
.Call()invocations that pass a string symbol rather than a structured symbol may keep crashing, because R will look into the most recently loaded SO of a given name. Since symbol registration is now the norm, we don’t expect this to cause much trouble.
load_all()no longer forces all bindings of a namespace to avoid lazy-load errors. Instead, it removes exported S3 methods from the relevant tables.
This improves the loading behaviour with packages that define objects in their namespaces lazily (e.g. with
This also makes
load_all()more predictable after a method has been removed from the package. It is now actually removed from the generic table. It would previously linger until R was restarted.
load_all()attaches testthat, it automatically suppresses conflicts.
CRAN release: 2020-05-29
Internal fixes for compatibility with the future 4.1.0 release.
CRAN release: 2018-10-29
compileargument which controls more finely whether to compile the code or not. The
recompileargument is now deprecated and will be removed in a future version of pkgload.
CRAN release: 2018-10-11
Trailing slashes now removed from all paths, which fixes issues on Windows (#73).
The help shim’s now work for
CRAN release: 2018-07-07
Package imports are now exported when using
load_all(). This behavior can be disabled by using
load_all(export_imports = FALSE).
is.package()functions have been removed.
run_example()now works on R 3.1.
load_all()now sets the
NOT_CRANenvironment variable when it sources testthat helpers. It also sets
DEVTOOLS_LOADto “true” so that you can check whether they are run during package loading.
dev_topic_path()now only returns the last path found, fixing an error when a package has both a package function level help with the same name. (#21)
load_all()no longer updates the collate directive. Instead this functionality has been moved to
dev_help()now optionally takes a character vector of packages to search within. This replaces
dev_topic_index_reset()is now exported, and allows you to reset the topic index associated with a given package.
NEWS.mdfile to track changes to the package.
Initial release from code spun off from devtools