[Rd] infinite recursion during pkg installation w/ methods, setAs

John Chambers jmc at research.bell-labs.com
Mon Sep 29 14:07:54 MEST 2003


The problem seems to have been fixed with a change committed this
morning to the archive.

Martin Maechler wrote:
> 
> >>>>> "Roger" == Roger D Peng <rpeng at jhsph.edu>
> >>>>>     on Sun, 28 Sep 2003 17:09:04 -0400 writes:
> 
>     Roger> I ran into a problem recently trying to update a
>     Roger> package which uses S4 methods using a recent beta of
>     Roger> R.  I think I can reproduce it with a simple example.
>     Roger> I have package called `testpkg' in directory
>     Roger> testpkg/.  In the R/ subdirectory of testpkg/ I have
>     Roger> a file called testpkg.R which contains the following
>     Roger> two lines:
> 
>     Roger> setClass("testpkg", representation(pts = "list"))
>     Roger> setAs("testpkg", "numeric", function(from, to) as.numeric(unlist(from)))
> 
> Yes, this *is* a problem in recent "R beta" versions.
> Doug Bates has reported something very similar to the R core..
> So, it should hopefully be resolved "soon".
> 
> Thank you very much, Roger, for reporting the problem!
> We *are* really very grateful if many people now switch from R
> 1.7.x to "1.8.0 beta" such that we can catch as many bugs as
> possible before release!
> 
> Martin
> 
>     Roger> Then, in the main testpkg/ directory I have an empty
>     Roger> `install.R' file and a dummy DESCRIPTION file (as
>     Roger> well as an empty man/ subdirectory).
> 
>     Roger> When I run `R CMD INSTALL testpkg' I get the following output:
> 
>     Roger> marla:> R CMD INSTALL testpkg
>     Roger> * Installing *source* package 'testpkg' ...
>     Roger> ** R
>     Roger> ** save image
>     Roger> [1] "testpkg"
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Loading required package: testpkg
>     Roger> Error during wrapup: evaluation is nested too deeply: infinite recursion?
>     Roger> Loading required package: testpkg
>     Roger> Error in options(x) : evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Error: evaluation is nested too deeply: infinite recursion?
>     Roger> Execution halted
>     Roger> ERROR: execution of package source for 'testpkg' failed
>     Roger> ** Removing '/home/rpeng/install/R-beta/lib/R/library/testpkg'
> 
>     Roger> Is this expected?  Did I specify something
>     Roger> incorrectly?
> 
>     Roger> If I remove the setAs() call, everything installs
>     Roger> fine.  Furthermore, if I include a line like:
> 
>     Roger> setAs("numeric", "testpkg", function(from, to)
>     Roger> list())
> 
>     Roger> that doesn't seem to cause a problem.  I only get the
>     Roger> infinite recursion problem when the first argument to
>     Roger> setAs() is the new class "testpkg".
> 
>     >> version
>     Roger> _
>     Roger> platform i686-pc-linux-gnu
>     Roger> arch     i686
>     Roger> os       linux-gnu
>     Roger> system   i686, linux-gnu
>     Roger> status   beta
>     Roger> major    1
>     Roger> minor    8.0
>     Roger> year     2003
>     Roger> month    09
>     Roger> day      27
>     Roger> language R
> 
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

-- 
John M. Chambers                  jmc at bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web: http://www.cs.bell-labs.com/~jmc



More information about the R-devel mailing list