Skip to content

Use the fully qualified forms for quos()#3161

Merged
yutannihilation merged 1 commit into
tidyverse:masterfrom
yutannihilation:refactor/remove-rlang-import
Mar 19, 2019
Merged

Use the fully qualified forms for quos()#3161
yutannihilation merged 1 commit into
tidyverse:masterfrom
yutannihilation:refactor/remove-rlang-import

Conversation

@yutannihilation
Copy link
Copy Markdown
Member

Though quos() are imported in utilities-tidy-eval.R, I think it's good practice to stick with the fully qualified forms in package code (I'm tolerant for test code). There are a few places that lacks rlang::, so this PR added them.

In addition, I want to remove this line to make it clear that we don't encourange the unqualified forms of quo() and quos(). I guess this was added by mistake.

#' @importFrom rlang quo quos

Copy link
Copy Markdown
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.

Our default practice is to import the whole rlang package and use the non-qualified form. However this PR makes calls to tidy eval function more consistent with other calls to rlang since rlang is not imported in ggplot.

@yutannihilation
Copy link
Copy Markdown
Member Author

@lionel- Thanks, I'm merging this for consistency this time. Do you think ggplot2 should also import the whole rlang package? If it's a common practice among tidyverse, ggplot2 should follow, and using unqualified form seems a bit better in terms of the speed.

@yutannihilation yutannihilation merged commit 196a9d4 into tidyverse:master Mar 19, 2019
@yutannihilation yutannihilation deleted the refactor/remove-rlang-import branch March 19, 2019 03:16
@lionel-
Copy link
Copy Markdown
Member

lionel- commented Mar 19, 2019

I don't have a strong opinion about this. Maybe best discussed with the regular contributors?

@yutannihilation
Copy link
Copy Markdown
Member Author

Sure.

@yutannihilation yutannihilation mentioned this pull request Mar 19, 2019
@lock
Copy link
Copy Markdown

lock Bot commented Sep 15, 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 Sep 15, 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