Skip to content

[R-pkg-devel] check cross-references error: Non-file package-anchored link(s)

10 messages · Gábor Csárdi, Duncan Murdoch, Jens Oehlschlägel

#
Good evening,

My package bit 4.0.2 (https://github.com/truecluster/bit) is being 
rejected by CRAN checks with warning:


 >Check: Rd cross-references, Result: WARNING
 >  Non-file package-anchored link(s) in documentation object 'clone.Rd':
 >    '[ff]{clone.ff}'
 >
 >  See section 'Cross-references' in the 'Writing R Extensions' manual.

although clone.ff is in clone.ff.rd as confirmed by

 > help("clone.ff","ff")[[1]]
[1] "/home/mypc/R/x86_64-pc-linux-gnu-library/4.0/ff/help/clone.ff"

I asked the maintainers to explain what is wrong and what to do and got 
no answer. Does someone here can help?

Best regards

Jens
On 16.06.20 22:31, G?bor Cs?rdi wrote:
#
Linking to the manual _file_ is now enforced on CRAN. Here is how to
get the file name:
[1] "/Users/gaborcsardi/Library/R/4.0/library/ff/help/clone"

So in this case you need to link to 'clone'.

Btw. since you already use roxygen2, you could also turn on markdown
support, and then [ff::clone.ff()] automatically creates the right
links in the latest version of roxygen2.

Gabor

On Wed, Jul 1, 2020 at 6:46 PM Dr. Jens Oehlschl?gel
<jens.oehlschlaegel at truecluster.com> wrote:
#
On 01/07/2020 1:46 p.m., Dr. Jens Oehlschl?gel wrote:
It's actually in ff/man/clone.rd, not clone.ff.rd.  There is no 
ff/man/clone.ff.rd file.

Duncan Murdoch
#
Thanks Gabor and Duncan,
but there *is* clone.ff.rd in the >= 4.0.0 versions of the packages bit/bit64/ff.

Hence the check warning is a false alarm resulting from checking bit 4.0.2 (GitHub.com/truecluster) against ff 2.2-14.2 (CRAN) instead of checking it against the also submitted ff 4.0.2 (GitHub.com/truecluster).

So all I can and will do is waiting that CRAN maintainers install and check again.

Best

Jens
#
Yes, this is one consequence of the newly enforced check. Now you can
choose which version of the ff package you want to be compatible with.
In the GH version a manual file was renamed and this is now a breaking
change, so you cannot be compatible with both.

Gabor

On Thu, Jul 2, 2020 at 11:47 AM Dr. Jens Oehlschl?gel
<jens.oehlschlaegel at truecluster.com> wrote:
#
There are a few ways to deal with this, but waiting for ff to be updated 
is probably easiest.

However, maybe ff can't be updated until bit is updated.  Here are some 
possibilities:

One way is to make bit depend on a particular version of ff.  That may 
cause a deadlock if both are being updated at once, but I think CRAN 
should be able to deal with it if they are informed of the issue.

Another way is to use R code in the Rd file to select which link to use. 
  For example, instead of \link[ff]{clone.ff}, you could use

\Sexpr[results=rd,stage=render]{clonelink()}

where clonelink() is a function that generates either 
"\link[ff]{clone.ff}" or "\link[ff:clone]{clone.ff}" depending on the 
detected installed version of ff.

Another choice that is nearly as easy as doing nothing is to include no 
link at all in this update, and make it a link again in the next update 
when the new ff is available.

Duncan Murdoch
On 02/07/2020 6:47 a.m., Dr. Jens Oehlschl?gel wrote:
#
Duncan,
Exactly that I have done: I submitted all three packages bit/bit64/ff in version 4.0.2 and made them dependend on Version >= 4.0.0.
And yes, the maintainers have been informed about the issue.

Best

Jens
#
On 02/07/2020 7:49 a.m., Dr. Jens Oehlschl?gel wrote:
I'm not sure that's what I meant, but I can't be sure, since I haven't 
seen your source.  What I meant is a package dependency, i.e. the 
existing ff on CRAN is version 2.2-14.2 and it depends on bit without 
saying what version of bit is needed.  The existing bit is 1.1-15.2 with 
no dependency on ff.

So you can force the new ff to use the new bit by giving the version 
number, e.g.

Depends:  bit (>= 2.0)

but it's not so obvious how to make the new bit depend on the new ff.
There's no way to say that the dependency is only to a help page, and 
circular strong dependencies are messy, so I'd suggest you use one of 
the other options I offered:  a dynamic link in the Rd file, or no link 
at all.

Duncan Murdoch
#
Thank you for the advice Duncan,

But let's not get carried away here: we are talking about a *warning* that only arises if two packages are checked together that are never meant to be installed together.
The new packages contain weeks of improvement-work, and I am not going to add back-and-forth-trick-work just to circumvent some warnings that arise only at the point of switching from old to new.

If there is a problem when checking the new packages together that's a different story and worth taking care about. I didn't find such problems.

Kind regards


Jens
#
On 02/07/2020 10:41 a.m., Dr. Jens Oehlschl?gel wrote:
That's a choice, but your package might face auto-rejection on CRAN. 
Asking CRAN to handle your update manually means extra work for them; if 
there's a simple way to handle it without that (and I've given you two 
to choose from), it seems kind of selfish not to use it.

BTW, assuming you got the two packages on CRAN, it wouldn't be hard for 
a user to install the new bit without updating ff:  just have both 
installed before your update, then ask to update bit.  Since it doesn't 
depend on ff, it won't trigger an ff update.  You can't expect R to know 
they were never meant to be installed together unless you record that 
fact in the dependencies in the DESCRIPTION file.

Duncan Murdoch