New Upstream Snapshot - r-cran-tidyselect

Ready changes

Summary

Merged new upstream version: 1.2.0+git20221024.1.b449033+dfsg (was: 1.2.0+dfsg).

Resulting package

Built on 2023-01-20T05:00 (took 7m12s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots r-cran-tidyselect

Diff

diff --git a/DESCRIPTION b/DESCRIPTION
index 8215bf0..9079baa 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: tidyselect
 Title: Select from a Set of Strings
-Version: 1.2.0
+Version: 1.2.0.9000
 Authors@R: c(
     person("Lionel", "Henry", , "lionel@rstudio.com", role = c("aut", "cre")),
     person("Hadley", "Wickham", , "hadley@rstudio.com", role = "aut"),
@@ -15,7 +15,7 @@ URL: https://tidyselect.r-lib.org, https://github.com/r-lib/tidyselect
 BugReports: https://github.com/r-lib/tidyselect/issues
 Depends: R (>= 3.4)
 Imports: cli (>= 3.3.0), glue (>= 1.3.0), lifecycle (>= 1.0.3), rlang
-        (>= 1.0.4), vctrs (>= 0.4.1), withr
+        (>= 1.0.4), vctrs (>= 0.5.0), withr
 Suggests: covr, crayon, dplyr, knitr, magrittr, rmarkdown, stringr,
         testthat (>= 3.1.1), tibble (>= 2.1.3)
 VignetteBuilder: knitr
@@ -23,12 +23,11 @@ ByteCompile: true
 Config/testthat/edition: 3
 Config/Needs/website: tidyverse/tidytemplate
 Encoding: UTF-8
+Roxygen: list(markdown = TRUE)
 RoxygenNote: 7.2.1
 NeedsCompilation: no
-Packaged: 2022-10-10 14:09:03 UTC; hadleywickham
+Packaged: 2023-01-20 04:57:43 UTC; root
 Author: Lionel Henry [aut, cre],
   Hadley Wickham [aut],
   RStudio [cph, fnd]
 Maintainer: Lionel Henry <lionel@rstudio.com>
-Repository: CRAN
-Date/Publication: 2022-10-10 19:00:02 UTC
diff --git a/MD5 b/MD5
deleted file mode 100644
index 469c1ec..0000000
--- a/MD5
+++ /dev/null
@@ -1,94 +0,0 @@
-900f633eab3d84af22ec8ce3413758bf *DESCRIPTION
-2d19204519c1403aa1c4d36dcbbd5a51 *LICENSE
-bb0487b56562a51a1ed2b1d6c6f6616f *NAMESPACE
-d9b30d72c6d8c02a7121335bc3bae773 *NEWS.md
-0fa60b49bc17479ffacbdf7e1d738a31 *R/compat-purrr.R
-3274a05a6f761f203ef960e42538fa67 *R/compat-type.R
-e088583b2a60dbac50626165c333037c *R/conditions.R
-679d601ac9a422497c6f3333f836aef4 *R/eval-bool.R
-c8b3ffddec9b71d310de11142a3e4bec *R/eval-c.R
-6ffec84f6b26d6a153f0b1d13920b4ee *R/eval-relocate.R
-4b028731c50ee52567604b40d8b27a97 *R/eval-rename.R
-e45d168327ed5edade1bcbbdb0ddef1a *R/eval-select.R
-e83cdc29e2d4922092c3253edda61fa3 *R/eval-walk.R
-56d8980e059b13528656ad9576bdb55b *R/faq.R
-a0daf9936531949194312ad45b7a3752 *R/helpers-misc.R
-60bdfdc40f33fe5562ae5a5eb6b3cb5a *R/helpers-pattern.R
-fc4755eef45b07bf583c36f470a790b0 *R/helpers-vector.R
-4555203c2d31f329dbd4793febcdbf95 *R/helpers-where.R
-011f477a9de6e8417c8575f01a9215cd *R/helpers.R
-8064f7c74ed2876d56b52e0aa1614f46 *R/lifecycle-deprecated.R
-49092f6ca267e44f692b0ae6c8560f07 *R/proxy.R
-69a92531f4b91811f4ae95266ed9694a *R/reexport-rlang.R
-2c731e20f44f1665d9866e7d194fa4b6 *R/sets.R
-2c9b982b979018363cc9dbbe282cfc6e *R/tidyselect-package.R
-6a45a17536943debfc7036c8ebd8f55f *R/utils.R
-90609c621f7082ed87d998f7b7745118 *R/vars-pull.R
-264c4f7496c29e60a5dec2bcf1a0e277 *R/vars.R
-7e4525c7c18f6837c0e5f49d7968270d *R/zzz.R
-09f1c50f284302818e9d61a4ba8291f6 *README.md
-d8b55803002ee512050bf195f217c198 *build/vignette.rds
-da58b3ee012ebb31d2a89290ddfb0822 *inst/doc/syntax.R
-7cf98e5a8509189bbbbaddd52107fef8 *inst/doc/syntax.Rmd
-f28f3b2f37d0f342316c82f3dd86fa7e *inst/doc/syntax.html
-cceffb1cc58a31bef9aa9e00fc3b626b *inst/doc/tidyselect.R
-5ae925284f8746747be64518c509bf94 *inst/doc/tidyselect.Rmd
-833d9cdf8a01e9d06d9601f7aaa87d39 *inst/doc/tidyselect.html
-a562cd2638a37156540d87c7fb29442d *man/all_of.Rd
-7252dfcd4e57ea98303946382f5140e8 *man/eval_relocate.Rd
-7febcfe2312d2157f97a05f7f7eaeab9 *man/eval_select.Rd
-bfda8dd481b40aa794cfd96b60e1d768 *man/everything.Rd
-ace77b02e9f1cc64b4c7671049178f36 *man/faq-external-vector.Rd
-c32efea62b1713911d8ce0ae961e34fb *man/faq-selection-context.Rd
-57a8436dfcfa3137060fadb8d78ec9d3 *man/faq/external-vector.Rmd
-dae2e2be8ce1403df3676432d19d14e4 *man/faq/selection-context.Rmd
-101fc3cea514d508ce26ee793c1920ec *man/faq/setup.Rmd
-1d8efaf1f2fdf234002cf2e4f2455357 *man/language.Rd
-7f139d934c3830e475ce7d7769832c7c *man/one_of.Rd
-5f1cdc2af056fbf926b28cfc22deafdc *man/peek_vars.Rd
-1e980934b49b8e19599cd90b6c911050 *man/poke_vars.Rd
-cf7cdc5c491a22bd880397f89e6c1b14 *man/reexports.Rd
-38f89602a38bead06497b0d536c93e9e *man/rmd/overview.Rmd
-4fa370dea568ce4c9aff95b54e6f8122 *man/rmd/setup.Rmd
-7353eeb66e5f14ca6765edf9937e8aec *man/starts_with.Rd
-14cc33716a4fe52fd75ba46eb23aa6f8 *man/tidyselect-package.Rd
-a41807bfb4718109156f16f490a648f9 *man/tidyselect_data_proxy.Rd
-f07e813547734ba589488359f25241a9 *man/vars_pull.Rd
-7b43b4051ead15c2f60ac0ebdf6e4d7e *man/vars_select.Rd
-6bfcf3e4feabaf9c59fc77c89ad81bc5 *man/vars_select_helpers.Rd
-4c40ad65ca3d4564c2c276be900b0797 *man/where.Rd
-8dff2a7d6831786a0527c7d97067c23a *tests/testthat.R
-6948a53b8032bae9c7f5c402f9c67476 *tests/testthat/_snaps/eval-bool.md
-3dc17964fa29904d9b2d0b6c71206a6b *tests/testthat/_snaps/eval-c.md
-f3a5e7f6e169f97f158a2344ab3ef835 *tests/testthat/_snaps/eval-relocate.md
-da0fc47723b0787b006de27dba160a0f *tests/testthat/_snaps/eval-rename.md
-22edc713c10e26d2d86f936deecaa760 *tests/testthat/_snaps/eval-select.md
-5ce47bcf312be6ea78e30d42d13046f7 *tests/testthat/_snaps/eval-walk.md
-e75c989d6486f9eba23d4ee32f2ab8e9 *tests/testthat/_snaps/helpers-misc.md
-f829a822c4b1761cb1a8f5817a71a28f *tests/testthat/_snaps/helpers-pattern.md
-5ca5ec9bccc44aafe78bf18d7d310f4e *tests/testthat/_snaps/helpers-vector.md
-a5c7d874e1b12986d2b36bcba5e7a689 *tests/testthat/_snaps/helpers-where.md
-72f41c84f80f76c45fc36529b1496e49 *tests/testthat/_snaps/helpers.md
-b385a26380ea6c4452cb2f5f68a6334f *tests/testthat/_snaps/lifecycle-deprecated.md
-219142e38de32c93616c9ed768d1bf1b *tests/testthat/_snaps/proxy.md
-7991c19c01ee01ac593ed6a0b5031468 *tests/testthat/_snaps/vars-pull.md
-6199366bec15cf172986e0c2e7bfc0d2 *tests/testthat/_snaps/vars.md
-cd8573470d846ff8bea57c5c0cef8a4b *tests/testthat/helper-tidyselect.R
-22e010cae556bef3cb0392c54807f1ee *tests/testthat/test-eval-bool.R
-345ff6cec03dc699343b992b52edb7d8 *tests/testthat/test-eval-c.R
-6db899df58a77c9eb87b3c6386f685df *tests/testthat/test-eval-relocate.R
-e3eeca5146d234a9b2f3897cbf19b9da *tests/testthat/test-eval-rename.R
-991c90c867801c2e660306b7f0e38691 *tests/testthat/test-eval-select.R
-b79916f017a7436441d93066b6896107 *tests/testthat/test-eval-walk.R
-57888f50d48452d6e0a2ab3f4521c300 *tests/testthat/test-helpers-misc.R
-d90fc8a1a8936b991760f1634b33fc47 *tests/testthat/test-helpers-pattern.R
-1dae0a27fda19fb8ab37b0c941dd15a2 *tests/testthat/test-helpers-vector.R
-7ef24ab8dc33c26b2f469339e8c3c7ab *tests/testthat/test-helpers-where.R
-e2773ae57c92bcba45f198fa7a73fa89 *tests/testthat/test-helpers.R
-0ee166bd0f0b725105f05b6176fb9478 *tests/testthat/test-lifecycle-deprecated.R
-e8c17a82b47541805188112ae7a42bf4 *tests/testthat/test-proxy.R
-a88f0fd6c7f1013b8d25c0ce7f8ede76 *tests/testthat/test-sets.R
-a331f0828432e672c591ec1058fbf9f9 *tests/testthat/test-vars-pull.R
-f355cec3c687f8dd790db151db415f66 *tests/testthat/test-vars.R
-7cf98e5a8509189bbbbaddd52107fef8 *vignettes/syntax.Rmd
-5ae925284f8746747be64518c509bf94 *vignettes/tidyselect.Rmd
diff --git a/NEWS.md b/NEWS.md
index a7e6f06..e2a0da8 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,8 @@
+# tidyselect (development version)
+
+* `eval_select()` out-of-bounds errors now use the verb "select" rather than
+  "subset" in the error message for consistency with `dplyr::select()` (#271).
+
 # tidyselect 1.2.0
 
 ## New features
@@ -15,7 +20,7 @@
 
 * Use of `.data` in tidyselect expressions is now deprecated to more cleanly
   separate tidy-select from data-masking. Replace `.data$x` with `"x"` and
-  `.data[[var]]` with `any_of(var)` or `all_of(var)` (#169).
+  `.data[[var]]` with `all_of(var)` (#169).
 
 * Use of bare predicates (not wrapped in `where()`) and indirection (without
   using `all_of()`) have been formally deprecated (#317).
diff --git a/R/conditions.R b/R/conditions.R
index 0e481e1..4b95048 100644
--- a/R/conditions.R
+++ b/R/conditions.R
@@ -19,23 +19,24 @@ with_chained_errors <- function(expr, action, call, eval_expr = NULL) {
         msg <- ""
       } else {
         code <- as_label(eval_expr)
-        msg <- cli::format_inline("Problem while evaluating {.code {code}}.")
+        msg <- cli::format_inline("In argument: {.code {code}}.")
       }
-      abort(msg, call = call, parent = cnd)
+      cli::cli_abort(c("i" = msg), call = call, parent = cnd)
     }
   )
 }
 
 subscript_action <- function(type) {
   switch(validate_type(type),
-    select = "subset",
+    select = "select",
     rename = "rename",
+    relocate = "relocate",
     pull = "extract"
   )
 }
 validate_type <- function(type) {
   # We might add `recode` in the future
-  if (!is_string(type, c("select", "rename", "pull"))) {
+  if (!is_string(type, c("select", "rename", "relocate", "pull"))) {
     cli::cli_abort("Unexpected value for {.arg tidyselect_type}.", .internal = TRUE)
   }
   type
diff --git a/R/eval-relocate.R b/R/eval-relocate.R
index 79db872..f62d675 100644
--- a/R/eval-relocate.R
+++ b/R/eval-relocate.R
@@ -88,6 +88,7 @@ eval_relocate <- function(expr,
     allow_rename = allow_rename,
     allow_empty = allow_empty,
     allow_predicates = allow_predicates,
+    type = "relocate",
     error_call = error_call
   )
 
diff --git a/build/vignette.rds b/build/vignette.rds
index 127784e..b286719 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/debian/changelog b/debian/changelog
index 51098ff..331034c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+r-cran-tidyselect (1.2.0+git20221024.1.b449033+dfsg-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 20 Jan 2023 04:57:48 -0000
+
 r-cran-tidyselect (1.2.0+dfsg-1) unstable; urgency=medium
 
   * New upstream version
diff --git a/man/all_of.Rd b/man/all_of.Rd
index db85794..c33416f 100644
--- a/man/all_of.Rd
+++ b/man/all_of.Rd
@@ -87,7 +87,7 @@ If any of the variable is missing from the data frame, that's an error:
 
 \if{html}{\out{<div class="sourceCode r">}}\preformatted{starwars \%>\% select(all_of(vars))
 #> Error:
-#> ! Problem while evaluating `all_of(vars)`.
+#> i In argument: `all_of(vars)`.
 #> Caused by error in `all_of()`:
 #> ! Can't subset elements that don't exist.
 #> x Elements `Sepal.Length` and `Sepal.Width` don't exist.
diff --git a/man/faq-external-vector.Rd b/man/faq-external-vector.Rd
index f3e237e..40514ca 100644
--- a/man/faq-external-vector.Rd
+++ b/man/faq-external-vector.Rd
@@ -31,9 +31,10 @@ mtcars \%>\% select(mpg:disp)
 }\if{html}{\out{</div>}}
 
 For historical reasons, it is also possible to refer an external vector
-of variable names. You get the correct result, but with a note informing
-you that selecting with an external variable is ambiguous because it is
-not clear whether you want a data frame column or an external object.
+of variable names. You get the correct result, but with a warning
+informing you that selecting with an external variable is ambiguous
+because it is not clear whether you want a data frame column or an
+external object.
 
 \if{html}{\out{<div class="sourceCode r">}}\preformatted{vars <- c("cyl", "am", "vs")
 result <- mtcars \%>\% select(vars)
@@ -46,12 +47,10 @@ result <- mtcars \%>\% select(vars)
 #>   # Now:
 #>   data \%>\% select(all_of(vars))
 #> 
-#> See
-#> <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
+#> See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
 }\if{html}{\out{</div>}}
 
-This note will become a warning in the future, and then an error. We
-have decided to deprecate this particular approach to using external
+We have decided to deprecate this particular approach to using external
 vectors because they introduce ambiguity. Imagine that the data frame
 contains a column with the same name as your external variable.
 
diff --git a/man/faq/external-vector.Rmd b/man/faq/external-vector.Rmd
index d8860a2..5238bc9 100644
--- a/man/faq/external-vector.Rmd
+++ b/man/faq/external-vector.Rmd
@@ -14,20 +14,20 @@ mtcars %>% select(mpg:disp)
 ```
 
 For historical reasons, it is also possible to refer an external
-vector of variable names. You get the correct result, but with a note
-informing you that selecting with an external variable is ambiguous
-because it is not clear whether you want a data frame column or an
-external object.
+vector of variable names. You get the correct result, but with a
+warning informing you that selecting with an external variable is
+ambiguous because it is not clear whether you want a data frame column
+or an external object.
 
 ```{r}
 vars <- c("cyl", "am", "vs")
 result <- mtcars %>% select(vars)
 ```
 
-This note will become a warning in the future, and then an error. We
-have decided to deprecate this particular approach to using external
-vectors because they introduce ambiguity. Imagine that the data
-frame contains a column with the same name as your external variable.
+We have decided to deprecate this particular approach to using
+external vectors because they introduce ambiguity. Imagine that the
+data frame contains a column with the same name as your external
+variable.
 
 ```{r}
 some_df <- mtcars[1:4, ]
diff --git a/tests/testthat/_snaps/eval-bool.md b/tests/testthat/_snaps/eval-bool.md
index a5b8aab..9b68708 100644
--- a/tests/testthat/_snaps/eval-bool.md
+++ b/tests/testthat/_snaps/eval-bool.md
@@ -5,13 +5,13 @@
       select_loc(mtcars, foobar & contains("am"))
     Condition
       Error in `select_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `foobar` doesn't exist.
     Code
       select_loc(mtcars, contains("am") | foobar)
     Condition
       Error in `select_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `foobar` doesn't exist.
     Code
       # Empty intersection
@@ -26,6 +26,6 @@
       select_loc(iris, Species | foo)
     Condition
       Error in `select_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `foo` doesn't exist.
 
diff --git a/tests/testthat/_snaps/eval-relocate.md b/tests/testthat/_snaps/eval-relocate.md
index e60e7a2..977018e 100644
--- a/tests/testthat/_snaps/eval-relocate.md
+++ b/tests/testthat/_snaps/eval-relocate.md
@@ -22,14 +22,14 @@
     Output
       <error/vctrs_error_subscript_oob>
       Error in `relocate_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't relocate columns that don't exist.
       x Column `c` doesn't exist.
     Code
       (expect_error(relocate_loc(x, c(1, 3))))
     Output
       <error/vctrs_error_subscript_oob>
       Error in `relocate_loc()`:
-      ! Can't subset columns past the end.
+      ! Can't relocate columns that don't exist.
       i Location 3 doesn't exist.
       i There are only 2 columns.
     Code
@@ -37,14 +37,14 @@
     Output
       <error/vctrs_error_subscript_oob>
       Error in `relocate_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `c` doesn't exist.
     Code
       (expect_error(relocate_loc(x, a, after = c)))
     Output
       <error/vctrs_error_subscript_oob>
       Error in `relocate_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `c` doesn't exist.
 
 # can relocate with out-of-bounds variables in `expr` if `strict = FALSE`
@@ -54,14 +54,14 @@
     Output
       <error/vctrs_error_subscript_oob>
       Error in `relocate_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `c` doesn't exist.
     Code
       (expect_error(relocate_loc(x, a, after = c, strict = FALSE)))
     Output
       <error/vctrs_error_subscript_oob>
       Error in `relocate_loc()`:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `c` doesn't exist.
 
 # can forbid rename syntax
diff --git a/tests/testthat/_snaps/eval-select.md b/tests/testthat/_snaps/eval-select.md
index ac95609..7e1e1e0 100644
--- a/tests/testthat/_snaps/eval-select.md
+++ b/tests/testthat/_snaps/eval-select.md
@@ -92,7 +92,7 @@
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `f(base = TRUE)`.
+      i In argument: `f(base = TRUE)`.
       Caused by error in `h()`:
       ! foo
       ---
@@ -107,7 +107,7 @@
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `f(base = FALSE)`.
+      i In argument: `f(base = FALSE)`.
       Caused by error in `h()`:
       ! foo
       ---
@@ -124,7 +124,7 @@
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `1 + ""`.
+      i In argument: `1 + ""`.
       Caused by error in `1 + ""`:
       ! non-numeric argument to binary operator
     Code
@@ -133,7 +133,7 @@
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `f()`.
+      i In argument: `f()`.
       Caused by error in `1 + ""`:
       ! non-numeric argument to binary operator
 
diff --git a/tests/testthat/_snaps/eval-walk.md b/tests/testthat/_snaps/eval-walk.md
index 572c719..78d80c3 100644
--- a/tests/testthat/_snaps/eval-walk.md
+++ b/tests/testthat/_snaps/eval-walk.md
@@ -61,7 +61,7 @@
       select_loc(iris, eval_tidy(foobar))
     Condition
       Error in `select_loc()`:
-      ! Problem while evaluating `eval_tidy(foobar)`.
+      i In argument: `eval_tidy(foobar)`.
       Caused by error:
       ! object 'foobar' not found
 
diff --git a/tests/testthat/_snaps/helpers-vector.md b/tests/testthat/_snaps/helpers-vector.md
index 28c7f23..781f5e7 100644
--- a/tests/testthat/_snaps/helpers-vector.md
+++ b/tests/testthat/_snaps/helpers-vector.md
@@ -4,7 +4,7 @@
       select_loc(letters2, all_of(c("a", "bar", "c")), strict = FALSE)
     Condition
       Error in `select_loc()`:
-      ! Problem while evaluating `all_of(c("a", "bar", "c"))`.
+      i In argument: `all_of(c("a", "bar", "c"))`.
       Caused by error in `all_of()`:
       ! Can't subset elements that don't exist.
       x Element `bar` doesn't exist.
@@ -28,41 +28,37 @@
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `all_of(TRUE)`.
+      i In argument: `all_of(TRUE)`.
       Caused by error in `all_of()`:
-      ! Must subset elements with a valid subscript vector.
-      x Subscript has the wrong type `logical`.
-      i It must be numeric or character.
+      ! Can't subset elements.
+      x Subscript must be numeric or character, not `TRUE`.
     Code
       (expect_error(select_loc(letters2, any_of(TRUE))))
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `any_of(TRUE)`.
+      i In argument: `any_of(TRUE)`.
       Caused by error in `any_of()`:
-      ! Must subset elements with a valid subscript vector.
-      x Subscript has the wrong type `logical`.
-      i It must be numeric or character.
+      ! Can't subset elements.
+      x Subscript must be numeric or character, not `TRUE`.
     Code
       (expect_error(select_loc(letters2, any_of(is.factor))))
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `any_of(is.factor)`.
+      i In argument: `any_of(is.factor)`.
       Caused by error in `any_of()`:
-      ! Must subset elements with a valid subscript vector.
-      x Subscript has the wrong type `function`.
-      i It must be numeric or character.
+      ! Can't subset elements.
+      x Subscript must be numeric or character, not a function.
     Code
       (expect_error(select_loc(letters2, all_of(is.factor))))
     Output
       <error/rlang_error>
       Error in `select_loc()`:
-      ! Problem while evaluating `all_of(is.factor)`.
+      i In argument: `all_of(is.factor)`.
       Caused by error in `all_of()`:
-      ! Must subset elements with a valid subscript vector.
-      x Subscript has the wrong type `function`.
-      i It must be numeric or character.
+      ! Can't subset elements.
+      x Subscript must be numeric or character, not a function.
 
 # any_of() errors out of context
 
diff --git a/tests/testthat/_snaps/lifecycle-deprecated.md b/tests/testthat/_snaps/lifecycle-deprecated.md
index a9ddd36..9bf4283 100644
--- a/tests/testthat/_snaps/lifecycle-deprecated.md
+++ b/tests/testthat/_snaps/lifecycle-deprecated.md
@@ -4,22 +4,20 @@
       vars_select(letters, TRUE)
     Condition
       Error:
-      ! Must subset columns with a valid subscript vector.
-      x Subscript `TRUE` has the wrong type `logical`.
-      i It must be numeric or character.
+      ! Can't select columns with `TRUE`.
+      x `TRUE` must be numeric or character, not `TRUE`.
     Code
       vars_select(letters, 2.5)
     Condition
       Error:
-      ! Must subset columns with a valid subscript vector.
+      ! Can't select columns with `2.5`.
       x Can't convert from `2.5` <double> to <integer> due to loss of precision.
     Code
       vars_select(letters, structure(1:3, class = "tidysel_foobar"))
     Condition
       Error:
-      ! Must subset columns with a valid subscript vector.
-      x Subscript `structure(1:3, class = "tidysel_foobar")` has the wrong type `tidysel_foobar`.
-      i It must be numeric or character.
+      ! Can't select columns with `structure(1:3, class = "tidysel_foobar")`.
+      x `structure(1:3, class = "tidysel_foobar")` must be numeric or character, not a <tidysel_foobar> object.
 
 # vars_select() has consistent location errors
 
@@ -28,47 +26,47 @@
       vars_select(letters, foo)
     Condition
       Error:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `foo` doesn't exist.
     Code
       vars_select(letters, -foo)
     Condition
       Error:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `foo` doesn't exist.
     Code
       # Names
       vars_select(letters, "foo")
     Condition
       Error:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `foo` doesn't exist.
     Code
       vars_select(letters, a:"foo")
     Condition
       Error:
-      ! Can't subset columns that don't exist.
+      ! Can't select columns that don't exist.
       x Column `foo` doesn't exist.
     Code
       # Locations
       vars_select(letters, 30, 50, 100)
     Condition
       Error:
-      ! Can't subset columns past the end.
+      ! Can't select columns past the end.
       i Locations 30, 50, and 100 don't exist.
       i There are only 26 columns.
     Code
       vars_select(letters, -100)
     Condition
       Error:
-      ! Can't subset columns past the end.
+      ! Can't select columns past the end.
       i Location 100 doesn't exist.
       i There are only 26 columns.
     Code
       vars_select(letters, !100)
     Condition
       Error:
-      ! Can't subset columns past the end.
+      ! Can't select columns past the end.
       i Location 100 doesn't exist.
       i There are only 26 columns.
 
@@ -146,20 +144,18 @@
       vars_rename(letters, A = TRUE)
     Condition
       Error:
-      ! Must rename columns with a valid subscript vector.
-      x Subscript `TRUE` has the wrong type `logical`.
-      i It must be numeric or character.
+      ! Can't rename columns with `TRUE`.
+      x `TRUE` must be numeric or character, not `TRUE`.
     Code
       vars_rename(letters, A = 1.5)
     Condition
       Error:
-      ! Must rename columns with a valid subscript vector.
+      ! Can't rename columns with `1.5`.
       x Can't convert from `1.5` <double> to <integer> due to loss of precision.
     Code
       vars_rename(letters, A = list())
     Condition
       Error:
-      ! Must rename columns with a valid subscript vector.
-      x Subscript `list()` has the wrong type `list`.
-      i It must be numeric or character.
+      ! Can't rename columns with `list()`.
+      x `list()` must be numeric or character, not an empty list.
 
diff --git a/tests/testthat/_snaps/vars-pull.md b/tests/testthat/_snaps/vars-pull.md
index 3843b44..ce63f53 100644
--- a/tests/testthat/_snaps/vars-pull.md
+++ b/tests/testthat/_snaps/vars-pull.md
@@ -24,19 +24,19 @@
       vars_pull(letters, 0)
     Condition
       Error:
-      ! Must extract column with a single valid subscript.
-      x Subscript `0` has value 0 but must be a positive location.
+      ! Can't extract column with `0`.
+      x Subscript `0` must be a positive location, not 0.
     Code
       vars_pull(letters, 100)
     Condition
-      Error in `vec_as_location2_result()`:
+      Error:
       ! Can't extract columns past the end.
       i Location 100 doesn't exist.
       i There are only 26 columns.
     Code
       vars_pull(letters, -100)
     Condition
-      Error in `vec_as_location2_result()`:
+      Error:
       ! Can't extract columns past the end.
       i Location 100 doesn't exist.
       i There are only 26 columns.
@@ -44,32 +44,30 @@
       vars_pull(letters, -Inf)
     Condition
       Error:
-      ! Must extract column with a single valid subscript.
-      x Subscript `-Inf` has the wrong type `double`.
-      i It must be numeric or character.
+      ! Can't extract column with `-Inf`.
+      x Can't convert from `-Inf` <double> to <integer> due to loss of precision.
     Code
       vars_pull(letters, TRUE)
     Condition
       Error:
-      ! Must extract column with a single valid subscript.
-      x Subscript `TRUE` has the wrong type `logical`.
-      i It must be numeric or character.
+      ! Can't extract column with `TRUE`.
+      x `TRUE` must be numeric or character, not `TRUE`.
     Code
       vars_pull(letters, NA)
     Condition
       Error:
-      ! Must extract column with a single valid subscript.
-      x Subscript `NA` can't be `NA`.
+      ! Can't extract column with `NA`.
+      x Subscript `NA` must be a location, not an integer `NA`.
     Code
       vars_pull(letters, na_int)
     Condition
       Error:
-      ! Must extract column with a single valid subscript.
-      x Subscript `na_int` can't be `NA`.
+      ! Can't extract column with `na_int`.
+      x Subscript `na_int` must be a location, not an integer `NA`.
     Code
       vars_pull(letters, "foo")
     Condition
-      Error in `vec_as_location2_result()`:
+      Error:
       ! Can't extract columns that don't exist.
       x Column `foo` doesn't exist.
 
@@ -107,7 +105,7 @@
     Output
       <error/rlang_error>
       Error:
-      ! Problem while evaluating `f(base = TRUE)`.
+      i In argument: `f(base = TRUE)`.
       Caused by error in `h()`:
       ! foo
       ---
@@ -122,7 +120,7 @@
     Output
       <error/rlang_error>
       Error:
-      ! Problem while evaluating `f(base = FALSE)`.
+      i In argument: `f(base = FALSE)`.
       Caused by error in `h()`:
       ! foo
       ---

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/R/site-library/tidyselect/doc/syntax.html
-rw-r--r--  root/root   /usr/lib/R/site-library/tidyselect/doc/tidyselect.html
-rw-r--r--  root/root   /usr/share/doc/r-cran-tidyselect/tests/testthat/_snaps/eval-select.md

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/share/doc/r-cran-tidyselect/tests/testthat/_snaps/eval-select.md.gz

Control files: lines which differ (wdiff format)

  • Depends: r-base-core (>= 4.2.2.20221110-2), 4.2.2.20221110-1), r-api-4.0, r-cran-cli (>= 3.3.0), r-cran-glue (>= 1.3.0), r-cran-lifecycle (>= 1.0.3), r-cran-rlang (>= 1.0.4), r-cran-vctrs (>= 0.4.1), 0.5.0), r-cran-withr

More details

Full run details