MichaelChirico / r-bugs

A ⚠️read-only⚠️mirror of https://bugs.r-project.org/
20 stars 0 forks source link

[BUGZILLA #4525] Problem in 'methods' package #1909

Closed MichaelChirico closed 4 years ago

MichaelChirico commented 4 years ago

From: feferraz@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::> Full_Name: Fernando Henrique Ferraz Pereira da Rosa Version: 1.8.0 OS: Linux 2.4.21 Submission from: (NULL) (200.206.211.169)

 After installing R 1.8.0, the R DBI interface stopped working. I tracked it

down as a problem in the 'methods' package, that comes in the default installation. Somehow the function '.valueClassTest' which is defined on package 'methods', is not being defined. To ilustrate how this breaks DBI, try this in a 1.8.0 R install (with DBI installed):

library(DBI)
con <- dbConnect(dbDriver("MySQL"), dbname = "test")

Error in dbConnect(dbDriver("MySQL"), dbname = "test") : couldn't find function ".valueClassTest"

  A dirty fix would be defining it by hand (from

src/library/methods/R/RMethodUtils.R) :

.valueClassTest <- function(object, classes, fname) { (...) }

   (Which works), but ideally it'd be nice determning why the function is

not being defined on the first place.


METADATA

MichaelChirico commented 4 years ago

From: Uwe Ligges <ligges@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>-dortmund.de> feferraz@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::> wrote:


Full_Name: Fernando Henrique Ferraz Pereira da Rosa
Version: 1.8.0
OS: Linux 2.4.21
Submission from: (NULL) (200.206.211.169)

After installing R 1.8.0, the R DBI interface stopped working. I tracked
it
down as a problem in the 'methods' package, that comes in the default
installation.
Somehow the function '.valueClassTest' which is defined on package
'methods', is not being defined.

It is. See below.

To ilustrate how this breaks DBI, try this in a 1.8.0 R install (with
DBI
installed):

> library(DBI)
> con <- dbConnect(dbDriver("MySQL"), dbname = "test")
Error in dbConnect(dbDriver("MySQL"), dbname = "test") :
couldn't find function ".valueClassTest"

A dirty fix would be defining it by hand (from
src/library/methods/R/RMethodUtils.R) :

.valueClassTest <- function(object, classes, fname) {
(...)
}

(Which works), but ideally it'd be nice determning why the function is
not being defined on the first place.

Package "methods" has a namespace from which .valueClassTest() is not exported, but it's in there, try: methods:::.valueClassTest

I think .valueClassTest() is not intended to be called by the user, so the bug seems to be in package DBI rather than in R, and the maintainer of DBI (David A. James <dj@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>-labs.com>, in CC) will certainly fix it.

Uwe Ligges


METADATA

MichaelChirico commented 4 years ago

NOTES: DBI is trying to call an unexported function from methods. Maintainer needs to fix or argue that the function should be exported. Exported in 1.8.1


METADATA

MichaelChirico commented 4 years ago

Audit (from Jitterbug): Thu Oct 16 18:23:30 2003 thomas moved from incoming to Language Tue Mar 23 02:06:31 2004 thomas changed notes Tue Mar 23 02:06:31 2004 thomas moved from Language to Add-ons Mon Apr 26 09:23:34 2004 ripley changed notes Mon Apr 26 09:23:34 2004 ripley moved from Add-ons to Add-ons-fixed


METADATA