Skip to content

Use .ignore_empty="all" for enquos() #2936

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

Merged

Conversation

yutannihilation
Copy link
Member

@yutannihilation yutannihilation commented Oct 12, 2018

I saw aes() is mentioned here: r-lib/rlang#643. It says enquos() will get "all" option for .ignore_empty, which ignores named missing arguments as well, in rlang v0.3.0 . This PR uses it to simplify the code.

Besides, r-lib/rlang#430 seems fixed, so the workaround is no longer needed.

@@ -89,7 +89,7 @@ test_that("assignment methods pull unwrap constants from quosures", {
})

test_that("quosures are squashed when creating default label for a mapping", {
p <- ggplot(mtcars) + aes(!!quo(identity(!!quo(cyl))))
p <- ggplot(mtcars) + aes(!!rlang::quo(identity(!!rlang::quo(cyl))))
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know why this matters, but if I use .ignore_empty = "all", this fails...

@yutannihilation yutannihilation changed the title [WIP] Use .ignore_empty="all" for enquos() Use .ignore_empty="all" for enquos() Oct 23, 2018
Copy link
Member

@lionel- lionel- left a comment

Choose a reason for hiding this comment

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

👍

@yutannihilation yutannihilation merged commit 7f13dfa into tidyverse:master Dec 18, 2018
@yutannihilation
Copy link
Member Author

Thanks for reviewing!

@yutannihilation yutannihilation deleted the use-ignore-empty-all branch December 18, 2018 00:38
@lock
Copy link

lock bot commented Jun 16, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jun 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants