Skip to content

Replace deprecated tidyselect vars() with rlang quosures - #837

Draft
alanahjonas95 wants to merge 12 commits into
mainfrom
aj641247-gsk-replace-tidyselect-vars
Draft

Replace deprecated tidyselect vars() with rlang quosures#837
alanahjonas95 wants to merge 12 commits into
mainfrom
aj641247-gsk-replace-tidyselect-vars

Conversation

@alanahjonas95

@alanahjonas95 alanahjonas95 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Resolves #733
by replacing deprecated tidyselect::vars() with rlang::quo() and rlang::quos() alternatives.

Changes Made

  • Removed vars() import from dplyr
  • Replaced function defaults to use rlang::quo()
  • Updated as_vars() to as_quosures() for clarity
  • Updated all internal calls and documentation

alanahjonas95 and others added 2 commits August 25, 2026 15:32
- Replace vars() default values with rlang::quo() in function signatures
- Update as_vars() functions to use rlang::quos() instead of vars()
- Remove import of vars() from dplyr in tfrmt-package.R
- Update error messages to remove reference to vars()
- Update trim_vars_quo_c() to no longer recognize 'vars' as a function name
- Update layer_tfrmt_arg_vars() to use rlang::quo() for comparison
- Replace do.call('vars', ...) calls with rlang::quos(...)
- Update test expectations to use rlang::quo() instead of vars()

Fixes: #733 - tidyselect vars() deprecation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The as_vars() function was converted to use rlang::quos() internally,
so the name was misleading. Renaming to as_quosures() better reflects
the function's purpose and return type.

Changes:
- Renamed as_vars() function and its S3 methods to as_quosures()
- Updated all internal calls to use as_quosures()
- Updated documentation and comments to reference quosures instead of vars()

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@alanahjonas95 alanahjonas95 changed the title Aj641247 gsk replace tidyselect vars Replace deprecated tidyselect vars() with rlang quosures Aug 25, 2026
alanahjonas95 and others added 10 commits August 25, 2026 15:50
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
group, column, sorting_cols, and theme_element stubs need to store a
*collection* of quosures (quosures), not a single quosure, since they
support multiple columns. Using quo() as the empty sentinel caused
failures in validate_cols_match() and other splice (!!!) sites.

Also fixes:
- NAMESPACE: rename S3 methods from as_vars.* to as_quosures.*
- layer_tfrmt_arg_vars: compare against quos() not quo()
- quo_get: recognise both quo() and quos() as empty sentinels
- Tests updated to expect quos() for group/column defaults

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…quos imports

- vars() from dplyr is still valid and used extensively throughout the
  codebase (tests, examples, vignettes). Only removed the deprecated
  tidyselect re-export. Restore importFrom(dplyr,vars).
- Add importFrom(rlang,quo) and importFrom(rlang,quos) since they are
  now used explicitly as default sentinels.
- Update man/tfrmt.Rd and man/tfrmt_sigdig.Rd to reflect new defaults
  (rlang::quos() instead of vars()) to fix codoc mismatch warnings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@alanahjonas95
alanahjonas95 marked this pull request as draft August 25, 2026 15:51
@alanahjonas95
alanahjonas95 force-pushed the aj641247-gsk-replace-tidyselect-vars branch from a4d80c3 to a839761 Compare August 25, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tidyselect vars()

1 participant