-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add support for suggests
field in standalone files
#2067
Comments
Well, the reason you see
Are there any r-lib standalone files that use cc @lionel- |
I understand that but unless there is |
It seems that |
I think what I should really be asking is: I don't think the content of |
On GitHub, all packages using that file have Perhaps the people using this either forgot to remove |
Now we're getting somewhere! @lionel- do you have any observations about this? |
I agree it makes sense to add |
Thanks to you both for helping advance the analysis of the problem we're trying to solve. So then ... I think this would have a companion PR in, e.g., rlang, introducing |
I've already created :) I've used these on https://github.com/eitsupi/neo-r-polars and these worked (not committed though) |
Another thought that this discussion has brought to my mind (but I don't know what to do about it): I wonder what fraction of packages that use But maybe cli is the wrong poster child to think about. In the sense that it's one of the packages where someone using the standalone file is pretty likely to have an indirect hard dependency on cli. |
I think
|
@jennybc hmm good point. In that particular case it would be kind of odd to use standalone-cli while already having a hard dep on cli. But more generally it could make sense for a standalone file to have parts of its functionality implemented with a suggest dep, and the host package could independently have a hard dep on the same package. So I guess ideally we don't want to add a package in Suggests if it's already in Imports? |
Lines 58 to 64 in 626cc0e
So in my opinion #2071 works fine. |
My observations really are just observations triggered by this discussion. I just meant this has me thinking through various practical aspects of standalone file usage. For example, I hadn't fully internalized that placing |
I think it's telling that https://github.com/search?q=path%3Aimport-standalone-cli.R&type=code doesn't include any tidyverse or r-lib packages. Are we sure that this file is part of a workflow that we still recommend? |
@hadley It was created for rlang specifically. |
@lionel- it's not something we'd recommend that other people use, right? |
I have never recommended it but I haven't stopped anyone from using it either. Either way it seems like a good idea to add support for suggests fields in standalone file? |
I feel like we should be very cautious about automating our standalone file approach too much. I'm worried people are going to gravitate towards when in most cases they would be better off taking an actual dependency. |
As like #1789, I wonder
suggests
field should be allowed in standalone files.For example, https://github.com/r-lib/rlang/blob/3d48c13d052724cd5997a730ea41bc8e6991691b/R/standalone-cli.R includes
cli::
, so thecli
package is needed in theSuggests
filed of the DESCRIPTION file.The text was updated successfully, but these errors were encountered: