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

Issues with use_tidy_eval() #484

Closed
jmgirard opened this issue Oct 26, 2018 · 8 comments
Closed

Issues with use_tidy_eval() #484

jmgirard opened this issue Oct 26, 2018 · 8 comments

Comments

@jmgirard
Copy link
Contributor

@jmgirard jmgirard commented Oct 26, 2018

Three issues. Maybe the first two were intentional, but it doesn't seem so.

  1. The function overwrites the dependency version for rlang to be >= 0.1.2 which is older than the version I already had in there (from use_tidy_versions()).
  2. The function overwrites the dependency version for roxygen2 to be *.
  3. When using "Install and Restart" after running this function, I get the following warnings:
Rd warning: /circumplex/man/tidyeval.Rd:23: file link 'syms' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:25: file link 'expr' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:25: file link 'quo' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:28: file link 'exprs' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:29: file link 'quos' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:31: file link 'enexpr' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:31: file link 'enquo' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:35: file link 'enexprs' in package 'rlang' does not exist and so has been treated as a topic
Rd warning: /circumplex/man/tidyeval.Rd:35: file link 'enquos' in package 'rlang' does not exist and so has been treated as a topic
@jennybc
Copy link
Member

@jennybc jennybc commented Oct 26, 2018

The minimum version of rlang is hard-wired inside use_tidy_eval():

use_dependency("rlang", "Imports", ">= 0.1.2")

I will defer to @lionel- whether that's a good plan going forward. use_tidy_versions(), on the other hand, will use the currently installed version, which could be overly conservative. It will probably always be true that one needs to apply some judgement in these cases. I doubt we can ever get it perfectly right.

I just tried it and don't see any change re: roxygen2. Are you sure that didn't come from use_tidy_versions()?

I can't reproduce what you're seeing with "Install and Restart". How does the help look at this point? What if you try to access the help on those functions through ?rlang::enquo in the Console?

@jmgirard
Copy link
Contributor Author

@jmgirard jmgirard commented Oct 26, 2018

Thanks for the quick reply. Here is what is displayed in my console for (1) and (2).

image

Interestingly, ?rlang::enquo correctly routes to the quotation help page.

@jennybc
Copy link
Member

@jennybc jennybc commented Oct 26, 2018

Did you indeed run devtools::document()?

@jmgirard
Copy link
Contributor Author

@jmgirard jmgirard commented Oct 26, 2018

Yes, I did. :)

@jmgirard
Copy link
Contributor Author

@jmgirard jmgirard commented Oct 26, 2018

On a related note, I'm wondering if utils-tidy-eval.R should import := as well. It's not a huge deal to add this if needed, but it might make sense to include.

@lionel-
Copy link
Member

@lionel- lionel- commented Oct 26, 2018

Would it make sense to always depend on latest rlang, to push things forward? For instance 0.3.0 has an important fix for .data[[ subsetting. In any case 0.1.2 is too old, it still has the old !! precedence.

@jmgirard
Copy link
Contributor Author

@jmgirard jmgirard commented Oct 26, 2018

Using the latest version might obviate this, but in general it seems like a reasonable approach might be to compare the version that usethis wants to the version that is currently listed in description and take the newer of the two. Overwriting the currently listed version with an older one (as it currently works) could introduce problems if the newer version actually is needed for other non-usethis reasons.

@hadley
Copy link
Member

@hadley hadley commented Nov 24, 2018

Extracted out this bug in to a new issue: #498

@hadley hadley closed this Nov 24, 2018
hadley added a commit that referenced this issue Nov 27, 2018
Includes refactoring internal use_dependency() to use it instead of more general dependency specification.

Fixes #398. Fixes #484. Fixes #498.
hadley added a commit that referenced this issue Nov 30, 2018
Includes refactoring internal use_dependency() to use it instead of more general dependency specification.

Fixes #398. Fixes #484. Fixes #498.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants