Skip to content

Commit

Permalink
Tweaks for c87633.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87635 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jan 26, 2025
1 parent 348852b commit 4cf55e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/library/tools/R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -1203,12 +1203,14 @@ inRbuildignore <- function(files, pkgdir) {
msg <- paste("WARNING: Added dependency on R >= 4.3.0 because",
"package code uses the pipe placeholder at the head of a chain of extractions syntax added in R 4.3.0.")
files <- unique(tab$file[i])
} else if(length(i <- which(tab$needs == "4.2.0"))) {
} else if(!hasDep420 &&
length(i <- which(tab$needs == "4.2.0"))) {
fixup_R_dep(pkgname, "4.2.0")
msg <- paste("WARNING: Added dependency on R >= 4.2.0 because",
"package code uses the pipe placeholder syntax added in R 4.2.0")
files <- unique(tab$file[i])
} else if(length(i <- which(tab$needs == "4.1.0"))) {
} else if(!hasDep410 &&
length(i <- which(tab$needs == "4.1.0"))) {
fixup_R_dep(pkgname, "4.1.0")
msg <- paste("WARNING: Added dependency on R >= 4.1.0 because",
"package code uses the pipe |> or function shorthand \\(...) syntax added in R 4.1.0.")
Expand Down
8 changes: 6 additions & 2 deletions src/library/tools/R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -1268,12 +1268,16 @@ add_dummies <- function(dir, Log)
any <- TRUE
msg <- "Missing dependency on R >= 4.3.0 because package code uses the pipe placeholder at the head of a chain of extractions syntax added in R 4.3.0."
files <- unique(tab$file[i])
} else if(length(i <- which(tab$needs == "4.2.0"))) {
} else if(length(i <- which(tab$needs == "4.2.0")) &&
!.package_metadata_has_depends_on_R_at_least(db,
"4.2.0")) {
if(!any) noteLog(Log)
any <- TRUE
msg <- "Missing dependency on R >= 4.2.0 because package code uses the pipe placeholder syntax added in R 4.2.0."
files <- unique(tab$file[i])
} else if(length(i <- which(tab$needs == "4.1.0"))) {
} else if(length(i <- which(tab$needs == "4.1.0")) &&
!.package_metadata_has_depends_on_R_at_least(db,
"4.1.0")) {
if(!any) noteLog(Log)
any <- TRUE
msg <- "Missing dependency on R >= 4.1.0 because package code uses the pipe |> or function shorthand \\(...) syntax added in R 4.1.0."
Expand Down

0 comments on commit 4cf55e6

Please sign in to comment.