Skip to content

Commit 8b11926

Browse files
Merge pull request #840 from lorenzwalthert/rc-1.6.0
- Prepare release v1.6.0 (#840).
2 parents 6300c7c + c8b533b commit 8b11926

File tree

6 files changed

+90
-16
lines changed

6 files changed

+90
-16
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: styler
33
Title: Non-Invasive Pretty Printing of R Code
4-
Version: 1.5.1.9001
4+
Version: 1.6.1
55
Authors@R:
66
c(person(given = "Kirill",
77
family = "Müller",
@@ -19,6 +19,7 @@ BugReports: https://github.com/r-lib/styler/issues
1919
Imports:
2020
backports (>= 1.1.0),
2121
cli (>= 1.1.0),
22+
glue,
2223
magrittr (>= 2.0.0),
2324
purrr (>= 0.2.3),
2425
R.cache (>= 0.15.0),

NEWS.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
# styler 1.5.1.9000 (Development version)
1+
# styler 1.6.1
32

43
* Files with `.Rmarkdown` extension are now recognized as an R markdown files in
54
`style_file()` and friends (#824).
@@ -16,10 +15,14 @@
1615

1716
* Break the line between `%>%` and `{` inside and outside function calls (#825).
1817

19-
* Add language server to third-party integrations vignette (#835).
18+
* Add language server to third-party integration vignette (#835).
2019

2120
* improved test setup with fixtures and similar (#798).
2221

22+
We'd like to thank all people who helped making this release possible:
23+
24+
[@bersbersbers](https://github.com/bersbersbers), [@eutwt](https://github.com/eutwt), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@j-mammen](https://github.com/j-mammen), [@jennybc](https://github.com/jennybc), [@JohannesNE](https://github.com/JohannesNE), [@jonkeane](https://github.com/jonkeane), [@lorenzwalthert](https://github.com/lorenzwalthert), and [@MichaelChirico](https://github.com/MichaelChirico).
25+
2326

2427
# styler 1.5.1
2528

@@ -110,7 +113,7 @@ We’d like to thank everyone who has furthered the development of the latest
110113
release of styler through their contributions in issues and pull requests:
111114

112115
[@ardydavari](https://github.com/ardydavari),
113-
[@gadenbuie](https://github.com/gadenbuie), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@jasonhan-vassar](https://github.com/jasonhan-vassar), [@laresbernardo](https://github.com/laresbernardo), [@lorenzwalthert](https://github.com/lorenzwalthert), [@MichaelChirico](https://github.com/MichaelChirico),
116+
[@gadenbuie](https://github.com/gadenbuie), [@IndrajeetPatil](https://github.com/IndrajeetPatil), @jasonhan-vassar, [@laresbernardo](https://github.com/laresbernardo), [@lorenzwalthert](https://github.com/lorenzwalthert), [@MichaelChirico](https://github.com/MichaelChirico),
114117
[@Moohan](https://github.com/Moohan),
115118
[@njtierney](https://github.com/njtierney),
116119
[@pat-s](https://github.com/pat-s),
@@ -127,6 +130,9 @@ release of styler through their contributions in issues and pull requests:
127130
* hexadecimal integers now preserve the trailing `L` when styled (#761).
128131
* add a pre-push hook to make sure news bullets are added to each PR (#765).
129132

133+
Thanks to everyone who contributed to this release:
134+
135+
[@krlmlr](https://github.com/krlmlr), [@lorenzwalthert](https://github.com/lorenzwalthert), and [@renkun-ken](https://github.com/renkun-ken).
130136

131137
# styler 1.4.0
132138

@@ -400,7 +406,7 @@ Thanks to all contributors involved, in particular
400406

401407
Thanks to all contributors involved, in particular
402408

403-
[@Banana1530](https://github.com/Banana1530), [@batpigandme](https://github.com/batpigandme), [@cpsievert](https://github.com/cpsievert), [@ellessenne](https://github.com/ellessenne), [@Emiller88](https://github.com/Emiller88), [@hadley](https://github.com/hadley), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@krlmlr](https://github.com/krlmlr), [@lorenzwalthert](https://github.com/lorenzwalthert), [@lwjohnst86](https://github.com/lwjohnst86), [@michaelquinn32](https://github.com/michaelquinn32), [@mine-cetinkaya-rundel](https://github.com/mine-cetinkaya-rundel), [@Moohan](https://github.com/Moohan), [@nxskok](https://github.com/nxskok), [@oliverbeagley](https://github.com/oliverbeagley), [@pat-s](https://github.com/pat-s), [@reddy-ia](https://github.com/reddy-ia), and [@russHyde](https://github.com/russHyde)
409+
[@Banana1530](https://github.com/Banana1530), [@batpigandme](https://github.com/batpigandme), [@cpsievert](https://github.com/cpsievert), [@ellessenne](https://github.com/ellessenne), [@Emiller88](https://github.com/Emiller88), [@hadley](https://github.com/hadley), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@krlmlr](https://github.com/krlmlr), [@lorenzwalthert](https://github.com/lorenzwalthert), [@lwjohnst86](https://github.com/lwjohnst86), [@michaelquinn32](https://github.com/michaelquinn32), [@mine-cetinkaya-rundel](https://github.com/mine-cetinkaya-rundel), [@Moohan](https://github.com/Moohan), [@nxskok](https://github.com/nxskok), [@oliverbeagley](https://github.com/oliverbeagley), [@pat-s](https://github.com/pat-s), @reddy-ia, and [@russHyde](https://github.com/russHyde)
404410

405411
# styler 1.1.1
406412

R/zzz.R

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,54 @@
88
styler.ignore_start = "# styler: off",
99
styler.ignore_stop = "# styler: on",
1010
styler.quiet = FALSE,
11-
styler.test_dir_writable = TRUE
11+
styler.test_dir_writable = TRUE,
12+
styler.interactive_ask_remove_old_caches = TRUE
1213
)
1314
toset <- !(names(op.styler) %in% names(op))
1415
if (any(toset)) options(op.styler[toset])
16+
remind_removing_old_cache()
1517
invisible()
1618
}
19+
20+
#' Ask people to remove the cache
21+
#'
22+
#' The way RStudio Startup works does not allow o read the prompt for some
23+
#' reasons (https://stackoverflow.com/questions/55772436/readline-does-not-prompt-user-input-from-rprofile-site-in-rstudio)
24+
#' So we better don't use the prompt and issue a message only.
25+
#' @keywords internal
26+
remind_removing_old_cache <- function() {
27+
if (interactive() && getOption("styler.interactive_ask_remove_old_caches", TRUE)) {
28+
dirs <- list.dirs(R.cache::getCachePath("styler"), recursive = FALSE)
29+
if (length(dirs) < 1) {
30+
return()
31+
}
32+
dirs <- dirs[unname(sapply(dirs, function(x) length(list.files(x)) > 0))]
33+
package_versions <- package_version(basename(dirs), strict = FALSE)
34+
package_versions <- package_versions[!is.na(package_versions)]
35+
old_package_versions <- package_versions[package_versions < styler_version]
36+
if (length(old_package_versions) < 1) {
37+
return()
38+
}
39+
40+
cmd <- glue::glue("styler::cache_clear(\"{basename(dirs)}\", ask = FALSE)") %>%
41+
paste0(collapse = "\n")
42+
cli::cli_alert_info(paste0(
43+
"You are using {{styler}} version {styler_version} but we found ",
44+
"caches for older versions of {{styler}}.\n",
45+
"You can delete them with the following commands:"
46+
))
47+
cat("\n")
48+
cli::cli_code(cmd)
49+
cat("\n")
50+
cli::cli_alert_info(
51+
paste(
52+
"We'll remind you every time you update {{styler}}.",
53+
"To suppress this prompt in the future:"
54+
)
55+
)
56+
cat("\n")
57+
cli::cli_code(
58+
'options("styler.interactive_ask_remove_old_caches" = FALSE)'
59+
)
60+
}
61+
}

cran-comments.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
This is a submission to fix a problem with persistent caching, reported by
2+
Prof Ripley on 07.09.2021, and invalid URLs, based on an email from Uwe Ligges
3+
on 17.09.2021.
14

25
## Test environments
36

4-
* local OS X install (10.15.7): R 4.0.3
5-
* ubuntu 18.04 (on GitHub Actions): R devel, R 4.0.3, R 3.6, R 3.5, R 3.4, R 3.3
6-
* Windows Server 10 (on GitHub Actions): R 3.6, R 4.0.3
7+
* local OS X install (10.15.7): R 4.1.0
8+
* ubuntu 18.04 (on GitHub Actions): R devel, R 4.1.1, R 4.0.5, R 3.6, R 3.5, R 3.4
9+
* Windows Server 10 (on GitHub Actions): R 3.6, R 4.0.5
710
* win-builder: R devel
811

912
## R CMD check results
@@ -32,13 +35,14 @@ I also ran R CMD check on all downstream dependencies of styler using the
3235
revdepcheck package. The
3336
downstream dependencies are:
3437

35-
* Reverse imports: biocthis, exampletestr, iNZightTools, languageserver,
36-
questionr, shinymeta, shinyobjects, ShinyQuickStarter, systemPipeShiny,
37-
tidypaleo.
38+
* Reverse imports: biocthis, boomer, exampletestr, flow, iNZightTools,
39+
languageserver, questionr, shinymeta, shinyobjects, ShinyQuickStarter,
40+
systemPipeShiny, tidypaleo
3841

39-
* Reverse suggests: autothresholdr, crunch, datastructures, drake, epigraphdb,
40-
knitr, multiverse, nph, precommit, reprex, shinydashboardPlus,
41-
shinyMonacoEditor, usethis.
42+
* Reverse suggests: autothresholdr, autothresholdr, crunch, datastructures,
43+
drake, epigraphdb, knitr, multiverse, nph, precommit, reprex, shiny.react,
44+
shinydashboardPlus, shinyMonacoEditor, usethis.
45+
4246

4347

4448
All of them finished R CMD CHECK with the same number of ERRORS, WARNINGS and

inst/WORDLIST

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ levelName
102102
LF
103103
LIBS
104104
lifecycle
105+
Ligges
105106
linux
106107
lorenz
107108
lorenzwalthert
@@ -144,6 +145,7 @@ questionr
144145
rcmdcheck
145146
RcppExports
146147
rds
148+
readline
147149
readme
148150
README
149151
rebased
@@ -199,6 +201,7 @@ shinyMonacoEditor
199201
shinyobjects
200202
ShinyQuickStarter
201203
sprintf
204+
stackoverflow
202205
StackOverflow
203206
startsWith
204207
STR
@@ -239,6 +242,7 @@ unnest
239242
unstyled
240243
usethis
241244
utf
245+
Uwe
242246
VignetteBuilder
243247
Visit'em
244248
walthert

man/remind_removing_old_cache.Rd

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)