From 48e8ab113f3c1a6a2281507ad9e447f53e78e793 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 24 Mar 2024 22:17:44 +0800 Subject: [PATCH 1/3] prepare release --- DESCRIPTION | 2 +- NEWS.md | 32 ++++++++++++++++++++++++++++++++ cran-comments.md | 4 ++-- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ab0af47dc..3797bde2c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: styler Title: Non-Invasive Pretty Printing of R Code -Version: 1.10.2.9000 +Version: 1.10.3 Authors@R: c(person(given = "Kirill", family = "Müller", diff --git a/NEWS.md b/NEWS.md index 9e715f3d4..62b3d4d5b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,37 @@ +# styler 1.10.3 + +This release was requested by the CRAN team since parser error messages changed, +which were hard-coded in some unit tests (#1180). + +**Minor changes** + +- Add a package sticker (#1172, #1173). +- Improve error message for scope (#1176). +- Update lintr config and address newly found lints (#1158). +- Fix new lints about implicit return (#1166). +- Clean new lints (#1149). +- Clean up unnecessary YAML front matter in README (#1165). + +**CI** + +- Update pre-commit and GitHub Actions (#1177, #1175, #1171, #1171, #1164, #1152, #1148). +- Delete URL check workflow (#1160). + +**Testing** + +- Suppress warning in io tests (#1169). +- Ensure unit tests check for appropriate error messages in the R parser for + R > 4.3 (#1180). +- Remove outdated test about repeated parsing (#1163). +- Update roxygen test comments (#1162). +- Delete unused snapshot (#1159). + +We thank everyone who helped making this release possible. + +[@AshesITR](https://github.com/AshesITR), [@averissimo](https://github.com/averissimo), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@lorenzwalthert](https://github.com/lorenzwalthert), [@mcanouil](https://github.com/mcanouil), [@moodymudskipper](https://github.com/moodymudskipper), [@olivroy](https://github.com/olivroy), [@sbanville-delfi](https://github.com/sbanville-delfi), [@sorhawell](https://github.com/sorhawell), [@ssh352](https://github.com/ssh352), [@swo](https://github.com/swo), and [@vertesy](https://github.com/vertesy). + # styler 1.10.2 This release was requested by the CRAN team to fix CRAN warning on invalid diff --git a/cran-comments.md b/cran-comments.md index 747d0b082..d05580a5a 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,8 +4,8 @@ editor_options: wrap: 79 --- -This is a release requested by the CRAN team to comply with -`R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS`. +This is a release requested by the CRAN team to comply with new error messages +in the R parser that caused unit tests to fail. ## Test environments From fd5b4ab5477c41663b63de835b8db9a921e6798b Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Mon, 25 Mar 2024 19:36:26 +0800 Subject: [PATCH 2/3] bump dependency number --- cran-comments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cran-comments.md b/cran-comments.md index d05580a5a..fe047b5d2 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -36,7 +36,7 @@ compliant with the requirements of CRAN. ## Downstream Dependencies -I also ran R CMD check on all 39 downstream dependencies of styler using the +I also ran R CMD check on all 47 downstream dependencies of styler using the revdepcheck package. All of them finished R CMD CHECK with the same number of ERRORS, WARNINGS and From 54df59b6232ce258d1f3172ace54a9c09bd13912 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sun, 7 Apr 2024 19:55:30 +0200 Subject: [PATCH 3/3] wrap in try-fetch to see if we can avoid onload error --- R/zzz.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/R/zzz.R b/R/zzz.R index c9b03c603..00e668084 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -17,9 +17,14 @@ ) toset <- !(names(op.styler) %in% names(op)) if (any(toset)) options(op.styler[toset]) - ask_to_switch_to_non_default_cache_root() - remove_cache_old_versions() - remove_old_cache_files() + rlang::try_fetch( + { + ask_to_switch_to_non_default_cache_root() + remove_cache_old_versions() + remove_old_cache_files() + }, + error = function(...) NULL + ) invisible() }