Jeroen,

thanks for raising the issues. Comments inline.


> On May 15, 2025, at 1:47 AM, Jeroen Ooms <jeroeno...@gmail.com> wrote:
> 
> R-universe builds and checks all CRAN packages on arm64 on Mac, Linux
> and soon Windows. It is important that we can identify from a binary
> package for which architecture it was built. R inserts this
> information into the second part of the "Built:" field in the
> DESCRIPTION. For example, packages with compiled code contain:
> 
>    Built: R 4.5.0; aarch64-unknown-linux-gnu; 2025-05-05 14:06:56 UTC; unix
> 
> And packages without compiled code contain:
> 
>    Built: R 4.5.0; ; 2025-05-08 06:46:33 UTC; unix
> 
> However this is not working for packages that compile something, but
> do not have a 'src' dir.


Can you give an example, please? I wonder if there is a real use-case or just 
bad package design. I wouldn't think that should happen as configure is 
supposed to only guide the compilation in src - if there is no src no binaries 
are expected as the package did not provide any native sources hence there 
should be no binary content. This looks like something that could be added to R 
CMD check?


> I think these packages are supposed to manually set "NeedsCompilation: yes" 
> in their DESCRIPTION file. Two suggestions:
> 
> 1. Currently R only records the platform in the mentioned "Built" if
> the source package contains a 'src' dir. Could this be improved such
> that it also does so for these packages with "NeedsCompilation: yes"?
> Here is a two line patch:
> https://github.com/r-devel/r-svn/pull/199/files
> 
> 2. There are a handful of CRAN packages that have "NeedsCompilation:
> yes" but they neither have a 'src' dir nor a 'configure' script. Afaik
> this is a contradiction, as there is no place any compilation can be
> invoked without either of these files present? I think in most these
> cases "NeedsCompilation: yes" is a leftover from older versions. If
> so, would it be possible for CMD check to warn against redundant
> NeedsCompilation:yes? Here is a script to list packages that currently
> use this: https://gist.github.com/jeroen/e8b225e9b1004a16ef90f50700352aa5
> 


I think both cases look like candidates to R CMD check, so, yes, agreed. 
Without valid use-cases I'm not convinced yet that an override is a good idea 
since it may get out of sync just as you noted, but I may be just missing a 
valid use-case. That said, if the override is paired with the check, i.e., if 
both your proposals are implemented (and a warning if configure generates 
binaries  without declaring them) that would cover all the bases.

Cheers,
Simon

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to