From dadler at uni-goettingen.de  Sun Aug 26 13:00:05 2012
From: dadler at uni-goettingen.de (Daniel Adler)
Date: Sun, 26 Aug 2012 13:00:05 +0200
Subject: [Rd] rdyncall fears removal from CRAN
In-Reply-To: <CABdHhvEbFzKTybO=tr8gSFfBxm1KuHrcya1OMGqi6RT9Jo3UXA@mail.gmail.com>
References: <20120814090906.31F128144A@gannet.stats.ox.ac.uk>
	<F0DD11BC-94E6-486A-9E25-9379D2B6BBE4@uni-goettingen.de>
	<CAFOpNVHbgq+aKS2WGF_Pf_BXSR1H11ucaMAFVJ4+EBtR8VNePw@mail.gmail.com>
	<CABdHhvEbFzKTybO=tr8gSFfBxm1KuHrcya1OMGqi6RT9Jo3UXA@mail.gmail.com>
Message-ID: <0A8759BD-2F32-4B43-BC72-F094FD419AC1@uni-goettingen.de>

Dear R Developers,

Here is a small patch against the trunk that makes 'makeNamespace' a first-level function (not defined inside another closure)
and defines two wrapper functions to 'registerNamespace' and 'unregisterNamespace'.

http://dyncall.org/~dadler/R-trunk-public-namespace.diff

The patch does not include a manual page for now, since I would like to get a feedback on this change first --
let me know if this makes sense to you or not.

At least, from what I can say? the rdyncall package would work without using '.Internal' then -- and I do not have to apply 
'do.call' hacks to prevent the package from removal on CRAN.

Regards,
- Daniel

On Aug 20, 2012, at 5:09 PM, Hadley Wickham wrote:

>> This is also very relevant for devtools. There have been some recent
>> changes to the in-development version of devtools, so that it loads
>> development packages into a namespace. Previously, it didn't use
>> namespaces, but now that it does, it much more closely approximates
>> normal package loading behavior.
>> 
>> It now uses the internal functions registerNamespace and
>> unregisterNamespace. Is there a workaround to do these things without
>> using the internal functions?
> 
> We're very aware that using these internal functions ties us to a
> specific version of R, and that they may change at any point in the
> future and break our code. That's an acceptable trade-off - using
> these internal functions gives us capabilities that makes fixing the
> code in the future worthwhile.
> 
> A minimal change to R that would satisfy our needs (and I suspect
> Daniel's) would be to move makeNamespace into the base package (i.e.
> up out of the function it is currently contained in), and to create R
> wrapper functions for registerNamespace and unregisterNamespace.  They
> wouldn't even need to be exported - we know what we're doing is
> dangerous.
> 
> If that solution isn't acceptable, we'd also be very happy to work
> with any R-core member to help develop a public facing API for
> namespace manipulation, including providing tests for common use
> cases.
> 
> Please let us know what we can do to help!
> 
> Hadley
> 
> -- 
> Assistant Professor
> Department of Statistics / Rice University
> http://had.co.nz/



[Rd] rdyncall fears removal from CRAN
Daniel Adler