Incorrect replacement suggested for devtools::update_packages() without arguments
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- r
- Lĩnh vực
- developer-experience, documentation, tooling
Hướng nghiên cứu
Start from the deprecation warning that devtools::update_packages() emits when called with no arguments, and from the migration note that maps it to pak::pak(). Reproduce the no-argument call to see the exact wording, then check whether pak::pak() with no arguments really replaces it. Done means the warning and migration docs separate the three cases in the issue and name a working alternative, such as utils::update.packages(), for the no-argument case. Confirm the wording with a maintainer first, since the issue leaves the exact text open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Incorrect replacement suggested for devtools::update_packages() without arguments
Description
As of devtools 2.5.0, calling devtools::update_packages() without arguments produces the warning:
`update_packages()` was deprecated in devtools 2.5.0.
Please use `pak::pak()` instead.
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.
- Ngôn ngữ chính
- R
- Star
- 2.5k
- Fork
- 760
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của r-lib/devtools
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
`dev_sitrep()` says to update with `pak::pak("somePackage")` but doing so doesn't change the reportCó thể đã có người làm @fabiandistler đã nhận 82 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
devtools::load_all() has an extra warning that pkgload::load_all() doesn'tCó thể đã có người làm @emstruong đã nhận 278 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Respect `vacation.dcf`Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Tất cả issue của r-lib/devtools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
hubverse-org/hubDevs#83 ·
-
data_bio2rarify - doc - dimensions wrongCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
leppott/BioMonTools#162 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
publications
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
epiforecasts/epiforecasts.github.io#161 ·
Maintainer thường phản hồi trong vòng 1 ngày