[R-pkg-devel] Tracking down inconsistent errors and notes across operating systems

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Jul 22 16:26:40 CEST 2021


On 22/07/2021 10:03 a.m., Iñaki Ucar wrote:
> Hi,
> 
> On Thu, 22 Jul 2021 at 15:51, Hannah Owens <hannah.owens using gmail.com> wrote:
>>
>> Hi all,
>> I am working on an update to a package I have on CRAN called occCite. My
>> latest release attempt didn’t pass incoming automated checks, because there
>> is an outstanding error. Additionally, there are some weird notes I would
>> like to get rid of, if anyone has suggestions.
>>
>> The killing error is in r-devel-linux-x86_64-debian-gcc, which is: Packages
>> required but not available: 'BIEN', 'taxize', ‘RPostgreSQL'
>>
>> I don’t understand this, as it is the only system that throws this error,
>> and the packages mentioned are available via CRAN. Any suggestions?
> 
> This kind of message usually arises when there is some problem with
> those packages on CRAN. Indeed,
> 
> https://cran.r-project.org/web/checks/check_results_BIEN.html
> https://cran.r-project.org/web/checks/check_results_taxize.html
> https://cran.r-project.org/web/checks/check_results_RPostgreSQL.html
> 
> the three of them have ERRORs in that platform. No issue on your end.
> You reply pointing to that.

Or reduce your dependence on them to Suggests.  As it is, nobody will be 
able to use your package on platforms that fail to install any of those. 
  Are they essential to most of your package, or just a few functions? 
If the latter, then list them as Suggests instead of Imports, leave them 
out of your imports in the NAMESPACE file, in the functions that need 
them add tests like

   if (!requireNamespace("BIEN"))
     stop("This function requires the BIEN package.")

   # do things, with BIEN:: prefix on functions from that package.

and make sure your examples are also conditionalized.

You'll still get messages that they aren't available, but it won't 
completely disable your package.

Duncan Murdoch

> 
>> Additionally, there are multiple platforms
>> (r-devel-linux-x86_64-fedora-clang; r-devel-linux-x86_64-fedora-gcc;
>> r-devel-windows-x86_64-gcc10-UCRT; r-patched-solaris-x86;
>> r-release-macos-arm64; r-release-macos-x86_64; r-oldrel-macos-x86_64) where
>> two notes pop up:
>>
>> NOTE 1: Namespace in Imports field not imported from: ‘bit64’ All declared
>> Imports should be used.
>>
>> The package does use bit64. Any tips on how to address this note?
> 
> Are you sure? Your NAMESPACE file does not import(bit64) nor
> importFrom(bit64,) anything.
> 
>> NOTE 2: Found 6 marked UTF-8 strings.
>>
>> I presume this is thrown because of the small sample dataset I’ve included
>> in the package, but why is it not thrown for all the platforms?
> 
> Not all the checks are necessarily done in all the platforms. You can
> silence this NOTE by converting the offending strings in your datasets
> to ASCII and resaving them.
>



More information about the R-package-devel mailing list