[Bioc-devel] some new warnings in a package

Martin Morgan martin.morgan at roswellpark.org
Tue May 3 00:30:19 CEST 2016



On 05/02/2016 12:37 PM, Ludwig Geistlinger wrote:
>> So yes, you should update the NAMESPACE file following the warning
>> message you see in your build report.
>
> Hi Martin, I did not encounter such a note on importing from base packages
> ever before - but ok, I followed your suggestion and added the imports.

yes, these warnings are relative new.

> However all remaining NOTEs and WARNINGs that appeared in the latest build
> persist, for example
>
> * checking for code/documentation mismatches ... WARNING
>
> just issues a warning with any further details.

ok thanks for pointing that out.

I believe this is a change in R, but the immediate culprit is 
BiocInstaller (indirectly loaded by AnnotationHub and other dependencies 
of your package). R CMD check would try and capture the 'stderr' stream 
to check for errors. BiocInstaller would try and capture the 'stderr' 
stream on package load to check for https capabilities [primarily a 
left-over from earlier version of R, where a output went directly to 
stderr rather than to a message or warning). BiocInstaller interfered 
with R CMD check.

This is fixed in BiocInstaller 1.21.7.

Thanks for the bug report and your persistence.

Martin


>
> Thx,
> Ludwig
>
>
>>
>>
>> On 05/02/2016 11:11 AM, Ludwig Geistlinger wrote:
>>> I encounter the same issue with EnrichmentBrowser - and apparently,
>>> several other packages too, e.g. ensembldb, erma, ExiMiR ...
>>>
>>> The warnings seem to be, at first glance, linked to messages e.g. for
>>> masking:
>>>
>>> -----------------------------------------------------------------------
>>>
>>> * checking S3 generic/method consistency ... WARNING
>>>
>>>
>>> Attaching package: 'EnrichmentBrowser'
>>>
>>> The following object is masked from 'package:BiocGenerics':
>>>
>>>       normalize
>>>
>>> See section 'Generic functions and methods' in the 'Writing R
>>> Extensions' manual.
>>>
>>> ------------------------------------------------------------------------
>>>
>>> However, even when renaming the function, so that masking is not
>>> necessary
>>> (and the message is thus not given anymore), the issue persists.
>>>
>>> There seems to be something weird with the current R-devel (2016-04-29
>>> r70565), as R CMD check as prompts me to import from base packages:
>>>
>>> -------------------------------------------------------------------------
>>> Undefined global functions or variables:
>>>     available.packages browseURL capture.output col2rgb data dev.off
>>>     formula head mad median memory.limit model.matrix p.adjust par pchisq
>>>     phyper png pnorm qnorm quantile read.delim rgb rnorm runif sd
>>>     segments symbols text unzip write.table
>>> Consider adding
>>>     importFrom("grDevices", "col2rgb", "dev.off", "png", "rgb")
>>>     importFrom("graphics", "par", "segments", "symbols", "text")
>>>     importFrom("stats", "formula", "mad", "median", "model.matrix",
>>>                "p.adjust", "pchisq", "phyper", "pnorm", "qnorm",
>>>                "quantile", "rnorm", "runif", "sd")
>>>     importFrom("utils", "available.packages", "browseURL",
>>>                "capture.output", "data", "head", "memory.limit",
>>>                "read.delim", "unzip", "write.table")
>>> to your NAMESPACE file.
>>> ---------------------------------------------------------------------------
>>
>> the advice here -- to import from base packages -- is correct. This
>> ensures that a user cannot define a function, e.g., col2rgb, that masks
>> the one in grDevices. It is appropriate because these base packages are
>> not by default imported into your package namespace, so symbols are
>> resolved by looking on the search() path. The only exception to this is
>> the actual 'base' package, which _is_ imported by default.
>>
>> The advice is conservative, in that it does not say that you should add
>> Imports: grDevices etc to your NAMESPACE file. This is also correct, in
>> that the grDevices package is always installed.
>>
>
>>
>> Martin
>>
>>>
>>> Somebody an idea? Or just waiting for the next R-devel snapshot?
>>>
>>> Thx,
>>> Ludwig
>>>
>>>
>>>>
>>>>
>>>>
>>>> On Fri, 29-04-2016, at 23:49, Martin Morgan
>>>> <martin.morgan at roswellpark.org> wrote:
>>>>> On 04/29/2016 05:23 PM, Ramon Diaz-Uriarte wrote:
>>>>>> Dear All,
>>>>>>
>>>>>> In case it matters, and since we are past the 22, I just noticed that
>>>>>> a
>>>>>> package I maintain (ADaCGH2) is giving warnings in Linux and Mac
>>>>>> (e.g.,
>>>>>> https://www.bioconductor.org/checkResults/devel/bioc-LATEST/ADaCGH2/zin2-checksrc.html)
>>>>>> that, if I recall correctly, were not being given around the 22nd. I
>>>>>> think
>>>>>> these warnings have started appearing with the latest Rs in BioC
>>>>>> (around
>>>>>> r70549?). I haven't been able to understand the ultimate cause of the
>>>>>> warnings (as they seem to refer to issues that are not in the code of
>>>>>> my
>>>>>> package), but they disappear when I move a package from Imports to
>>>>>> Depends.
>>>>>
>>>>> They seem to come from GLAD's use of packageStartupMessage() in
>>>>> .onLoad
>>>>> (e.g., when the package is imported) rather than the recommended
>>>>> .onAttach (when the package is attached to the search() path, e.g.,
>>>>> via
>>>>> library() or Depends: in the DESCRIPTION file).
>>>>>
>>>>> I updated GLAD to use packageStartuupMessage() in .onAttach; I think
>>>>> the
>>>>> warnings will go away.
>>>>
>>>> Martin, thanks for the reply and details. And sorry for my
>>>> not-particularly-explicit message; yes, GLAD is the package that I
>>>> moved
>>>> to
>>>> Depends. And I did not say (though I had intended too ---time to go to
>>>> bed)
>>>> that I had committed my changes to svn.
>>>>
>>>> Anyway, should I revert my changes to keep GLAD in Imports?
>>>>
>>>> Best,
>>>>
>>>> R.
>>>>
>>>>
>>>>>
>>>>> Martin
>>>>>
>>>>>>
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> R.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> This email message may contain legally privileged and/or confidential
>>>>> information.  If you are not the intended recipient(s), or the
>>>>> employee
>>>>> or agent responsible for the delivery of this message to the intended
>>>>> recipient(s), you are hereby notified that any disclosure, copying,
>>>>> distribution, or use of this email message is prohibited.  If you have
>>>>> received this message in error, please notify the sender immediately
>>>>> by
>>>>> e-mail and delete this email message from your computer. Thank you.
>>>>
>>>>
>>>> --
>>>> Ramon Diaz-Uriarte
>>>> Department of Biochemistry, Lab B-25
>>>> Facultad de Medicina
>>>> Universidad Autónoma de Madrid
>>>> Arzobispo Morcillo, 4
>>>> 28029 Madrid
>>>> Spain
>>>>
>>>> Phone: +34-91-497-2412
>>>>
>>>> Email: rdiaz02 at gmail.com
>>>>          ramon.diaz at iib.uam.es
>>>>
>>>> http://ligarto.org/rdiaz
>>>>
>>>> _______________________________________________
>>>> Bioc-devel at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>>
>>>
>>
>>
>> This email message may contain legally privileged and/or confidential
>> information.  If you are not the intended recipient(s), or the employee or
>> agent responsible for the delivery of this message to the intended
>> recipient(s), you are hereby notified that any disclosure, copying,
>> distribution, or use of this email message is prohibited.  If you have
>> received this message in error, please notify the sender immediately by
>> e-mail and delete this email message from your computer. Thank you.
>>
>
>


This email message may contain legally privileged and/or confidential information.  If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited.  If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.



More information about the Bioc-devel mailing list