Skip to content

Conversation

@teunbrand
Copy link
Collaborator

This PR aims to fix #4834.

It replaces checks of the type is.myclass(x) && length(x) == 1 by {rlang} scalar checks. There was no function for scalar numeric checks, so I added one.

@teunbrand teunbrand mentioned this pull request Mar 7, 2023
37 tasks
@teunbrand
Copy link
Collaborator Author

teunbrand commented Mar 7, 2023

TODO: use_standalone("r-lib/rlang", "types-check") instead of home grown argument checkers. From #5220

@teunbrand teunbrand marked this pull request as draft March 7, 2023 07:33
@teunbrand
Copy link
Collaborator Author

I'm putting this PR on hold pending the release of rlang 1.1.0, which is required for the imported functions.

@thomasp85 thomasp85 added this to the ggplot2 3.4.2 milestone Mar 13, 2023
@teunbrand
Copy link
Collaborator Author

teunbrand commented Mar 13, 2023

I think this PR is now ready for review, but should wait with merging until rlang 1.1.0 has landed on CRAN

@teunbrand teunbrand marked this pull request as ready for review March 13, 2023 21:09
Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - have you checked that all checks are covered by unit tests (they should as I went through this when updating the errors before last minor release but better check again

@thomasp85
Copy link
Member

hopefully rlang will be released this week

@teunbrand
Copy link
Collaborator Author

have you checked that all checks are covered by unit tests

I'll double-check this later today

@thomasp85
Copy link
Member

rlang 1.1.0 is now on CRAN

@teunbrand teunbrand merged commit 06ca577 into tidyverse:main Mar 14, 2023
@teunbrand teunbrand deleted the type_checks branch March 14, 2023 21:15
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.

Update input checks to use rlang type checking

2 participants