From net|kj@ @end|ng |rom gm@||@com  Tue Oct  3 11:16:04 2023
From: net|kj@ @end|ng |rom gm@||@com (=?UTF-8?Q?Jan_Net=C3=ADk?=)
Date: Tue, 3 Oct 2023 11:16:04 +0200
Subject: [Rd] After package update, old S4 method is dispatched
In-Reply-To: <32A80143-4755-4D96-822A-E386840E4438@R-project.org>
References: <CA+6hu7ekxwdH55eSVs5-PxfCv75khNUURbHjT2rB_jLSrCNgZw@mail.gmail.com>
 <32A80143-4755-4D96-822A-E386840E4438@R-project.org>
Message-ID: <CA+6hu7dRJeDySh=13NxiwMcuG_Kp6P_1qJfo-6nq8dCMD9Z+JQ@mail.gmail.com>

Simon,

Many thanks for your advice! The issue was that another package was
inheriting from the "mirt" class in question. Apparently, some methods are
cached at build time (is this documented anywhere?). After reinstalling the
package that extends the "mirt" class, the proper method is now being
dispatched. No other packages needed to be reinstalled.

Best,
Jan

po 2. 10. 2023 v 20:56 odes?latel Simon Urbanek <simon.urbanek at r-project.org>
napsal:

> Jan,
>
> have you re-installed all packages? If you change (update) any package
> that uses S4 it may be necessary to re-install all its reverse-dependencies
> as well since they may include cached values in their namespaces, so the
> easiest is to make sure you re-install all packages.
>
> Cheers,
> Simon
>
>
> > On Oct 3, 2023, at 4:18 AM, Jan Net?k <netikja at gmail.com> wrote:
> >
> > Hello R-devel,
> >
> > I hope that you are all doing well and that this is the right place to
> > discuss my somewhat mysterious issue with S4.
> >
> > On our Ubuntu server, we have "mirt" package installed which defines S4
> > method for "coef" standard generic. We updated the package with the usual
> > "install.packages", restarted, and observer error calling coef on mirt
> > object that should not be possible: "Error in which: argument "nfact" is
> > missing, with no default" (which has no such argument).
> >
> > After days of investigation, I found that from mirt 1.37 to current 1.40,
> > the method changed as well as some internal functions used by the method.
> > The aforementioned error stems from the fact that these internal ordinary
> > functions were changed properly as we updated the package, but the S4
> > method dispatched stuck with the 1.37 version. I am by no means an expert
> > on S4 matter, but I know that these are cached to some extent. I thought
> > the cache is session-bound and have no idea how the issue can possibly
> > persist even after a complete reboot of the machine. I can detach and
> > library() mirt in one R session which solves the issue temporarily, but
> > emerges right back in any new R session.
> >
> > Sadly, I cannot provide any reproducible example as I am completely
> unaware
> > of the cause and even I cannot reproduce this issue outside of the
> server.
> >
> > Any insights on how this issue could have started would be highly
> > appreciated.
> >
> > Best regards,
> > Jan Net?k
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
>

	[[alternative HTML version deleted]]



[Rd] After package update, old S4 method is dispatched
=?UTF-8?Q?Jan_Net=C3=ADk?=