Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in across() when supplied ... without a .fns argument #6646

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

simonpcouch
Copy link
Contributor

Closes #6638. cc @DavisVaughan

@DavisVaughan
Copy link
Member

DavisVaughan commented Jan 19, 2023

@hadley this is the outcome of today's pairing session. Seem reasonable?

In a perfect world we'd mention "... must be empty when .fns isn't supplied" but I still feel like the error is an improvement on what we had before (which was the deprecation warning about supplying ... in across()). The nice part about this error is that check_dots_empty0() will show you which arg caused the problem, and that should be enough for you to figure out you had a typo.

I'm not hugely worried about throwing a great error here anyways. When we escalate the deprecation so that not supplying .fns is an error, we can remove all of this anyways.

We don't need to worry about catching this in the "expansion" path, because expansion always falls back to this "evaluation" path of across() if dots are supplied in any way.

@DavisVaughan DavisVaughan requested a review from hadley January 19, 2023 19:53
@DavisVaughan DavisVaughan merged commit 26ccf3f into tidyverse:main Jan 19, 2023
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.

across() fails silently when using .funs (used in scoped mutate) instead of .fns
3 participants