Skip to content
Prev 49435 / 63424 Next

Problem understanding behaviour of versionCheck for loadNamespace (and when versions for Imports packages are checked)

Hi Duncan

The difference is that in your call to loadNamespace, the versionCheck list
has 3 components (name, op and version), whereas the documentation only
mentions 2 (op and version).
loadNamespace 'works' for me provided I add a third component to the list
(even a nonsense one).

What I haven't yet had the fortitude to do is track down through the code to
see what the arguments are (ie how many elements there are in the
versionCheck list) to any calls to loadNamespace that are generated
internally when the Imports to package2 are being loaded (either because
they are explicitly mentioned in the NAMESPACE file, or because they are
invoked by a "importedpackage1::fun_from_imported_package1" line of code).

I'll put a bug report together later today, and include my toy packages etc.

Once again thanks for looking at this for me

Geoff

-----Original Message-----
From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] 
Sent: Thursday, 27 November 2014 12:09 PM
To: Geoff Lee; r-devel at r-project.org
Subject: Re: [Rd] Problem understanding behaviour of versionCheck for
loadNamespace (and when versions for Imports packages are checked)
On 26/11/2014, 7:38 PM, Geoff Lee wrote:
A little too quick, it seems...
If you can put together a simple set of steps to illustrate a bug, then
reporting on bugs.r-project.org is the way to get it recorded.
Reporting it on this list is really hit and miss.  But I think from your
previous description, something else is going on.  When I try to load a
namespace with a bad version number, I get an error:

loadNamespace("rgl", versionCheck=list(name="rgl", op=">",
version=package_version('3.0')))
Error in loadNamespace("rgl", versionCheck = list(name = "rgl", op = ">",  :
  namespace 'rgl' 0.95.1163 is being loaded, but > 3.0 is required

Duncan Murdoch
imported'
attached.
3.0.0).