You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect replacement suggested for devtools::update_packages() without arguments #2709
However, pak::pak() without arguments is not a drop-in replacement for devtools::update_packages().
Reproducible example
devtools::update_packages()
# Warning: Please use `pak::pak()` instead.pak::pak()
# Error: error in pak subprocess# Caused by error in `find_package_root(path = root)`:# Could not find R package in `.` or its parent directories.
The suggested replacement requires a package project in the current directory or its parent directories, whereas the original function could be called without specifying a package.
Expected behavior
The deprecation warning should provide a working replacement for the no-argument invocation or explain that there is no direct equivalent.
The migration guide currently documents:
update_packages("pkg") ->pak::pak("pkg")
However, it does not address the no-argument invocation.
Suggested improvement
Please update the deprecation warning and migration documentation to distinguish between:
Updating a specified package.
Updating installed packages without specifying a package.
Installing or updating dependencies of the current package project.
If pak does not provide an equivalent for the no-argument invocation, the warning should state this explicitly and recommend an appropriate alternative, such as utils::update.packages() where applicable.
Why this matters
Following the deprecation warning verbatim results in an error in a context where the original function worked.
Deprecation warnings should provide actionable migration guidance, particularly when the recommended replacement has different default behavior.
changed the title [-]Incorrect replacement suggested by update_packages() deprecation warning[/-][+]Incorrect replacement suggested for devtools::update_packages() without arguments[/+]on Oct 30, 2026
Activity
[-]Incorrect replacement suggested by update_packages() deprecation warning[/-][+]Incorrect replacement suggested for devtools::update_packages() without arguments[/+]