[Rcpp-devel] Rcpp_precious_remove again (Windows)

Dominick Samperi djsamperi at gmail.com
Sat Jan 21 01:11:59 CET 2023


You are right Dirk, RInside overrides what is specified because the function
myAskYesNo doesn't actually ask, so this explains why there is to
termination
prompt under Windows. This does not change what happens under Linux
because this function is assigned to a Windows-specific callback. Under
Linux the confirmation message appears.

The current status is that the example seems to work using R-devel,
but not using R-4.2.2.

Dominick











On Fri, Jan 20, 2023 at 1:40 PM Dominick Samperi <djsamperi at gmail.com>
wrote:

> As I said, everything is fine using R-devel, so R_LIBS just took care of a
> local configuration issue for
> Tomas. The problem was reported for R-4.2.2, and I don't think setting
> R_LIBS will make any difference.
>
> On the interactive=false issue, the same source code is used for both
> Linux and Windows, so the
> behavior should be the same. In RInside.h the constructor does set
> interactive=false, but
> there is a comment above it that says "overridden in code, cannot be set
> to false." This
> explains why the prompt is seen under Linux (and should be seen under
> Windows).
>
> Dominick
>
>
> On Fri, Jan 20, 2023 at 12:54 PM Dirk Eddelbuettel <edd at debian.org> wrote:
>
>>
>> On 20 January 2023 at 10:28, Tomas Kalibera wrote:
>> | Executing then without R_LIBS set gave this error:
>> |
>> | "
>> | Error: function 'Rcpp_precious_remove' not provided by package 'Rcpp'
>> | In addition: Warning message:
>> | In library(package, lib.loc = lib.loc, character.only = TRUE,
>> | logical.return = TRUE,  :
>> |    there is no package called 'Rcpp'
>> | "
>> |
>> | So I knew I had to set R_LIBS.
>>
>> Very good catch.  The 'Rcpp_precious_remove' was spurious as I suspected
>> all
>> along but it was trickily hiding the actual issue.  Any clever thought on
>> how
>> we could check for missing .libPaths() etc when RInside starts?
>>
>> On 20 January 2023 at 17:22, Tomas Kalibera wrote:
>> | On 1/20/23 16:35, Dominick Samperi wrote:
>> | > After fixing the library issue and getting the app running what
>> | > happens when you terminate with q()?
>> | >
>> | > You should see the usual "Save workspace image? [y/n/c]:", and under
>> | > Linux this is what happens.
>> |
>> | The program just exits without asking.
>>
>> I think you can control that by setting the 'interactive' toggle. From
>> memory, there is a global state variable reflecting the command-line
>> choice
>> (or invocation) and IIRC the ctor may offer it. I have the same behaviour
>> in
>> littler where we long ago decided to have interactive=false (because hey,
>> scripting) and that sometimes leads to slightly different outcomes so we
>> have
>> an override there.  And RInside and littler are pretty close cousins.
>>
>> Dirk
>>
>> --
>> dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20230120/11132370/attachment-0001.html>


More information about the Rcpp-devel mailing list