-
Notifications
You must be signed in to change notification settings - Fork 761
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
DevPackage Dependencies #902
Conversation
|
That is true about the non-standard fields, although it is only included in the general NOTE, and Writing R Extensions does state
So it shouldn't be be hard to justify it if needed. But the argument is largely moot as you said because once you submit to CRAN you wouldn't need this anyway. It would be possible to get the name to pass the check by prefixing it with Other names we could consider are I will work on some tests and ping you when they are done! |
Ok e43e46e has tests, a note to NEWS and a vignette with example usage. Let me know if I can make it clearer on first reading. I changed the field name to The main remaining limitation with this approach is there is no way to supply any additional arguments to the However I don't know what syntax I could use that would be easily parsable. I had initially thought of a syntax like So I think it is ok to leave passing additional options out for now, as I am not sure how much use they would get and the current approach is much simpler. |
@@ -0,0 +1,86 @@ | |||
--- | |||
title: "Devtools Remote Dependencies" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just make this "Devtools dependencies" and include remote versions as a section?
This looks good overall and I'm happy with the name I agree that it's fine to leave out additional options for other endpoints for now. Could you please add a few tests for badly formed remote specifications? |
Ok jimhester@ce16021 should be good to go, I think I addressed all of your comments. Thank you for the review! |
return() | ||
} | ||
|
||
dev_packages <- trimws(unlist(strsplit(remotes, ",[[:space:]]*"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to make this trim_ws
Some thoughts:
Also, is there a way to specify private git/github/bitbucket/svn repos? I suppose one possibility is for users to install those packages separately. But it would be nice not to have to do that. (I've almost never had to install a private package so there may well be an obvious way.) |
private repos can currently be accessed in a couple of ways
That should handle a large number of the cases however 100% support would require us to define a syntax that would allow passing in additional arguments to the backends. Something like (using the suggested
The only real tricky part in this is disambiguate the commas within the options from those outside, as the remotes are split on commas first. |
I prefer to omit the |
Ok! @hadley any opinion on using |
How about calling it Or how about using (and abusing) the already used |
This is a great PR, by the way! |
I am not opposed to using |
I don't really like I do think I prefer |
@hadley Fair point, I was already thinking about extending this to repositories. 👍) |
2978c37
to
b8f76b2
Compare
This allows package authors to specify DevPackage in their DESCRIPTION, which devtools will use to install development versions of the dependencies prior to looking for them in normal repositories. The format is 'type|user/repo', where type is optional (default github) defining the install_type to use, e.g. (git, gitorious, svn, ect.).
1. Use Remotes as DESCRIPTION field 2. Rename internal functions to dev_remote_type, which does parsing and function lookup
The latter partially matches remotesha.
b8f76b2
to
2e9589b
Compare
Thanks - this is awesome :) |
…` in the imports section was causing issues with install, as dependency installation looked for it on CRAN rather than github. Following advice from r-lib/devtools#902
This allows package authors to specify DevPackage in their DESCRIPTION,
which devtools will use to install development versions of the
dependencies prior to looking for them in normal repositories. The
format is 'type|user/repo', where type is optional (default github)
defining the install_type to use, e.g. (git, gitorious, svn, ect.).
An example description would be (for the ggplot2 book for instance)
This would allow people to install it with simply
This implementation seems to work fine as-is, but I had a few questions as far as the API
DevPackage
a good name for this or should we use something else?|
a good delimiter for the type? I picked it because it should not appear in URLs or user/repository names. Using/
or:
seem like they would require more complicated logic to parse properly in all cases.