[R-pkg-devel] Suggesting an archived package in the DESCRIPTION file
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Tue Mar 5 19:28:35 CET 2024
On 05/03/2024 1:04 p.m., Dirk Eddelbuettel wrote:
>
> On 5 March 2024 at 11:56, Duncan Murdoch wrote:
> | I have mixed feelings about r-universe. On the one hand, it is really
> | nicely put together, and it offers the service described above. On the
> | other, it's probably a bad idea to follow its advice and use
> | install.packages() with `repos` as shown: that will install development
> | versions of packages, not releases.
>
> Yup. It's a point I raised right at the start as I really do believe in
> curated releases but clearly a lot of people prefer the simplicity of
> 'tagging a release' at GitHub and then getting a build.
What I'm seeing is that the tags are ignored, and it is distributing the
HEAD of the main branch. I don't think most users should be using that
version: in my packages it won't have had full reverse dependency
checks, I only do that before CRAN releases. And occasionally it hasn't
even passed R CMD check, though that's not my normal workflow. On the
other hand, I like that it's available and easy to install, it just
shouldn't be the default install.
I suppose I could do all development on a "devel" branch, and only merge
it into the main branch after I wanted to make a release, but then the
R-universe instructions would be no good for getting the devel code.
>
> r-universe is indeed good at what it does and reliable. There are limited
> choices in 'driving' what you can do with it. We rely quite heavily on it in
> a large project for work. As each 'repo' can appear only once in a universe,
> we resorted to having the 'offical' build follow GitHub 'releases', as well
> as (optional, additional) builds against a the main branch from another
> universe. This example is for a non-CRAN package.
>
> With CRAN packages, r-universe can be useful too. For some of my packages, I
> now show multiple 'badges' at the README: for the released CRAN version as
> well as for the current 'rc' in the main branch sporting a differentiating
> final digit. RcppArmadillo had a pre-releases available to test that way for
> a few weeks til the new release this week. So in effect, this gives you what
> `drat` allows yet also automagically adds builds. It's quite useful when you
> are careful about it.
>
> | Do you know if it's possible for a package to suggest the CRAN version
> | first, with an option like the above only offered as a pre-release option?
>
> In the language of Debian and its dpkg and tools, one solution to that would
> be 'repository pinning' to declare a 'value' on a repository. There, the
> default is 500, and e.g. for r2u I set this to 700 as you usually want its
> versions.
>
> We do not have this for R, but it could be added (eventually) as a new value
> in PACKAGES, or as a new supplementary attribute.
I don't know anything about dpkg, but having some options available to
package authors would be a good thing.
Duncan Murdoch
More information about the R-package-devel
mailing list