[Rd] 7 arguments passed to .Internal(identical) which requires 6
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jun 7 10:57:59 CEST 2012
On 06/06/2012 21:04, peter dalgaard wrote:
> FYI, Brian has backed out the changes to identical() in r59533 of R-patched. Please retry your test codes with the new version. (Due to some ISP mess-up, Brian is temporarily unable to reply in detail himself.)
>
> -pd
Some comments (now my ISP has repaired its network and I can send from
the machine on which I did this):
- AFAICS this only applies to binary distributions, not mentioned by the OP.
- There has never been any guarantee of forwards compatibility. If you
want a package to run under 2.x.y, install it under 2.x.y. There is
limited support for backwards compatibility, so packages installed under
2.x.y will _normally_ run under 2.x.z for z > y.
So the whining appeared to be specious: if BioC want to distribute
binary packages which run under all 2.15.x, they need to build them
under 2.15.0, *and* check that they run under later versions. (AFAIK
the CRAN binary package providers expect users to be using the current
version of R.)
R-patched should be thought of as having an intermediate version number
for this purpose, e.g. currently > 2.15.0, < 2.15.1.
- The issue is package installations which copy code from the current
version of R into the package. That is not a good idea, and in general
not recommended. We see 3 main circumstances:
+ S4 methods. This was first reported many years ago, and bites
frequently. It was deemed a 'feature'. The usual instance is that the
default method is copied from a function in another contributed package
which is subsequently updated, but it can also apply to the packages in
R itself.
+ Some packages making functions into S3 default methods. The advice
there has changed a while ago, to write a wrapper instead of using
foo.default <- base::foo
but there are lots of packages not doing that.
+ Byte compilation, which in some cases removes the closure wrappers
from simple .Internal calls, and so captures the .Internal call at the
time of compilation.
- In the particular case of identical(), the C code has generally been
written for backwards and attempted future compatibility, but that was
not the case for the version in 2.15.0. (It is the case for the version
in R-devel and that now in R-patched: I didn't back out all the changes.)
But because identical() seems to be captured more than we anticipated
and the change was not that important, I reverted it. But if a similar
change is needed for an important enough bug fix, it will go into
R-patched (and there is one there now).
So the general principles are
- install a package under the current version of R, or perhaps an
earlier patch release of the same series. If using R-devel, be prepared
to re-install any package you use (in practice this is rare: for example
XML, compositions, timeDate and timeSeries needed to be re-installed
since 2-15-branch was branched).
- if any dependency of an S4-using package changes, re-install the
package. And this includes the standard packages (which is why they
should be listed in Depends:). Uwe's CRAN Windows binary builder does
do that, so you may need to re-install the binary package even though
its version number has not changed.
>
> On Jun 6, 2012, at 20:29 ,<luke-tierney at uiowa.edu> <luke-tierney at uiowa.edu> wrote:
>
>> On Wed, 6 Jun 2012, Matthew Dowle wrote:
>>
>>> Dan Tenenbaum<dtenenba<at> fhcrc.org> writes:
>>>
>>>>
>>>> I know this has come up before on R-help
>>>> (http://r.789695.n4.nabble.com/7-arguments-passed-to-Internal-identical-which-
>>> requires-6-td4548460.html)
>>>> but I have a concise reproducible case that I wanted to share.
>>>>
>>>> Also, please note the Bioconductor scenario which is potentially
>>>> seriously impacted by this.
>>>> The issue arises when a binary version of a package (like my example
>>>> package below) is built under R 2.15.0 Patched but then installed
>>>> under R 2.15.0. Our package AnnotationDbi (which hundreds of other
>>>> packages depend on) is impacted by this issue to the extent that
>>>> calling virtually any function in it will return something like this:
>>>> Error in ls(2) :
>>>> 7 arguments passed to .Internal(identical) which requires 6
>>>>
>>>> My concern is that when R 2.15.1 is released and Bioconductor starts
>>>> building all its packages under it, that R 2.15.0 users will start to
>>>> experience this problem. We can ask all users to upgrade to R 2.15.1
>>>> if we have to, but it's not usually the case that a minor point
>>>> release MUST be installed in order to run packages built under it
>>>> (please correct me if I'm wrong). We would much prefer a workaround or
>>>> fix to make an upgrade unnecessary.
>>>>
>>>
>>> I'm seeing the same issue. Installing the latest R-Forge .zip of data.table
>>> built using 2.15.0 patched, on R 2.15.0 (or 2.14.1 same issue), then running
>>> data.table(a=1:3) produces the "7 arguments passed to .Internal(identical)
>>> which requires 6" error. traceback() and debugger() just display the top level
>>> call. debug(data.table) and stepping through reveals it is a call to identical
>>> () but just a regular one. No .Internal() call in the package, let alone
>>> passing 6 or 7 arguments to .Internal.
>>>
>>> Not sure how else to debug or trace it. R-Forge is byte compiling data.table
>>> using R 2.15.0 patched (iiuc), would that make a difference when the byte code
>>> is loaded into 2.15.0 which doesn't have the new argument in identical()?
>>
>> Yes it would.
>>
>> luke
>>
>>>
>>> Matthew
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list