Skip to content

Commit b96e5e5

Browse files
3.2.0 as submitted to CRAN (#2726)
* Create a second r-devel devcontainer, set it as default * Need repos set on this image * DESCRIPTION version * Copy-edit to NEWS * empty entry for backports:4.4.0 * Fix up backport_linter for oldrel stuff * ignore references to removed linter * to-be-deleted: massive GHA for all versions * Revert "to-be-deleted: massive GHA for all versions" This reverts commit b7a34d1. * Fix up exclusions of large files
1 parent 39f7a59 commit b96e5e5

File tree

10 files changed

+70
-46
lines changed

10 files changed

+70
-46
lines changed

.Rbuildignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ testthat-problems[.]rds$
2727
^_pkgdown\.yaml$
2828
^docs$
2929
^pkgdown$
30-
^vignettes/[^-]+.gif$
30+
# large files not needed for CRAN
31+
^man/figures/logo[.]png$
32+
# keep '-still.gif' compact versions
33+
^vignettes/.*([^l]|[^l]l|[^i]ll|[^t]ill|[^s]till)[.]gif$
3134
^CRAN-SUBMISSION$
3235
^CODE_OF_CONDUCT\.md$
3336
^paper$

.dev/revdep_get_repos.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env Rscript
22
# Script to get URL keys from CRAN
3-
# of packags that Suggest or Import lintr
3+
# of packages that Suggest or Import lintr
44

55
cran_db <- as.data.frame(available.packages(repos = "https://cran.r-project.org"), stringsAsFactors = FALSE)
66
lintr_re <- "\\blintr\\b"
@@ -50,12 +50,12 @@ git_urls <- extract_github_repo(urls)
5050
matched <- nzchar(git_urls)
5151

5252
utils::write.csv(
53-
data.frame(package = lintr_pkg[!matched], repo = file.path("https://github.com/cran", lintr_pkg[!matched])), # nolint: strings_as_factors_linter.
53+
data.frame(package = lintr_pkg[!matched], repo = file.path("https://github.com/cran", lintr_pkg[!matched])),
5454
"revdep-no-repos",
5555
row.names = FALSE, quote = FALSE
5656
)
5757
utils::write.csv(
58-
data.frame(package = lintr_pkg[matched], repo = git_urls[matched]), # nolint: strings_as_factors_linter.
58+
data.frame(package = lintr_pkg[matched], repo = git_urls[matched]),
5959
"revdep-repos",
6060
row.names = FALSE, quote = FALSE
6161
)

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"build": { "dockerfile": "Dockerfile", "context": ".."}
2+
"build": { "dockerfile": "r-devel/Dockerfile", "context": ".."}
33
}
File renamed without changes.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"build": { "dockerfile": "Dockerfile", "context": "../.." }
3+
}

.devcontainer/r-devel/Dockerfile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM docker.io/rhub/r-minimal:devel
2+
3+
RUN apk update && \
4+
apk add --no-cache git gcc g++ libxml2 linux-headers musl-dev
5+
6+
COPY DESCRIPTION .
7+
8+
RUN Rscript -e ' \
9+
options(repos="https://cloud.r-project.org"); \
10+
install.packages("remotes"); \
11+
remotes::install_deps(dependencies = c( \
12+
"Imports", \
13+
"Config/needs/development" \
14+
)) \
15+
'

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: lintr
22
Title: A 'Linter' for R Code
3-
Version: 3.1.2.9000
3+
Version: 3.2.0
44
Authors@R: c(
55
person("Jim", "Hester", , role = "aut"),
66
person("Florent", "Angly", role = "aut",

NEWS.md

+29-29
Large diffs are not rendered by default.

R/backport_linter.R

+10-7
Original file line numberDiff line numberDiff line change
@@ -131,34 +131,37 @@ normalize_r_version <- function(r_version) {
131131
# devel NEWS https://cran.rstudio.com/doc/manuals/r-devel/NEWS.html
132132
# release NEWS https://cran.r-project.org/doc/manuals/r-release/NEWS.html
133133
backports <- list(
134+
`4.4.0` = character(), # need character() entries for oldrel specifications
135+
`4.3.3` = character(),
134136
`4.3.0` = c("R_compiled_by", "array2DF"),
137+
`4.2.3` = character(),
135138
`4.2.1` = "findCRANmirror",
136139
`4.2.0` = c(".pretty", ".LC.categories", "Sys.setLanguage()"),
137-
`4.1.3` = character(), # need these for oldrel specifications
140+
`4.1.3` = character(),
138141
`4.1.0` = c("numToBits", "numToInts", "gregexec", "charClass", "checkRdContents", "...names"),
139-
`4.0.5` = character(), # need these for oldrel specifications
142+
`4.0.5` = character(),
140143
`4.0.0` = c(
141144
".class2", ".S3method", "activeBindingFunction", "deparse1", "globalCallingHandlers",
142145
"infoRDS", "list2DF", "marginSums", "proportions", "R_user_dir", "socketTimeout", "tryInvokeRestart"
143146
),
144-
`3.6.3` = character(), # need these for oldrel specifications
147+
`3.6.3` = character(),
145148
`3.6.0` = c(
146149
"asplit", "hcl.colors", "hcl.pals", "mem.maxNsize", "mem.maxVsize", "nullfile", "str2lang",
147150
"str2expression", "update_PACKAGES"
148151
),
149-
`3.5.3` = character(), # need these for oldrel specifications
152+
`3.5.3` = character(),
150153
`3.5.0` = c("...elt", "...length", "askYesNo", "getDefaultCluster", "isFALSE", "packageDate", "warnErrList"),
151-
`3.4.4` = character(), # need these for oldrel specifications
154+
`3.4.4` = character(),
152155
`3.4.0` = c(
153156
"check_packages_in_dir_details", "CRAN_package_db", "debugcall", "hasName",
154157
"isS3stdgeneric", "strcapture", "Sys.setFileTime", "undebugcall"
155158
),
156-
`3.3.3` = character(), # need these for oldrel specifications
159+
`3.3.3` = character(),
157160
`3.3.0` = c(
158161
".traceback", "chkDots", "curlGetHeaders", "endsWith", "grouping", "isS3method",
159162
"makevars_site", "makevars_user", "Rcmd", "sigma", "startsWith", "strrep", "validEnc", "validUTF8"
160163
),
161-
`3.2.5` = character(), # need these for oldrel specifications
164+
`3.2.5` = character(),
162165
`3.2.0` = c(
163166
".getNamespaceInfo", "check_packages_in_dir_changes", "debuggingState",
164167
"dir.exists", "dynGet", "extSoftVersion", "get0", "grSoftVersion", "hsearch_db",

tests/testthat/test-backport_linter.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ test_that("backport_linter detects backwards-incompatibility", {
3838

3939
# oldrel specification
4040
expect_lint(
41-
".pretty(2)",
42-
rex::rex(".pretty (R 4.2.0) is not available for dependency R >= 4.1.3."),
41+
"R_compiled_by()",
42+
rex::rex("R_compiled_by (R 4.3.0) is not available for dependency R >= 4.2.3."),
4343
backport_linter("oldrel")
4444
)
4545

@@ -50,13 +50,13 @@ test_that("backport_linter detects backwards-incompatibility", {
5050

5151
expect_lint(
5252
"numToBits(2)",
53-
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 3.6.3."),
53+
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 4.0.5."),
5454
backport_linter("oldrel-3")
5555
)
5656
# no interference from namespace-qualification (even of base functions)
5757
expect_lint(
5858
"base::numToBits(2)",
59-
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 3.6.3."),
59+
rex::rex("numToBits (R 4.1.0) is not available for dependency R >= 4.0.5."),
6060
backport_linter("oldrel-3")
6161
)
6262

0 commit comments

Comments
 (0)