Windows check problems.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows check problems.

Duncan Murdoch-2
The thread starting with this message:

https://stat.ethz.ch/pipermail/r-package-devel/2019q4/004745.html

described problems Rich Heiberger was having with package checking on
Windows.  It appeared that during the tests of examples, an old version
of the package was loaded but the new tests were being run, causing lots
of confusion and trouble.

I reproduced the error, and I think I've found the cause.  I had his
package tarball on a network drive, with a local drive being used for
the session temporary directory.  The check code needs a copy of the
package installed in the temporary directory, and already has one in the
pkg.Rcheck directory where the check is taking place, so it tries to
create a junction linking them.  (On non-Windows systems it uses a symlink.)

Apparently the junction creation silently fails:  an empty directory
appears on the temp dir.  When R loads the package code, it doesn't find
it in the temp dir, and goes looking in other libraries, where it found
an older versions of the package.

A workaround for this issue is to set the environment variable

   R_WIN_NO_JUNCTIONS=yes

before doing the check.  This causes the check code to copy all the
files into the temp dir and things are fine.

I don't know whether the junction creation should have succeeded, or
whether it should have signalled an error when it didn't, but it might
make sense for R to do a simple sanity check after trying to create the
junction (e.g. test for the presence of DESCRIPTION in the newly created
location), falling back to a copy if things didn't succeed.

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: Windows check problems.

Tomas Kalibera
For reference, this has been addressed in R-devel, R now falls back to
copy when symlinking of the package directory silently fails.

Thanks to Duncan for his analysis and a patch that fixed this.
Tomas

On 12/11/19 5:22 PM, Duncan Murdoch wrote:

> The thread starting with this message:
>
> https://stat.ethz.ch/pipermail/r-package-devel/2019q4/004745.html
>
> described problems Rich Heiberger was having with package checking on
> Windows.  It appeared that during the tests of examples, an old
> version of the package was loaded but the new tests were being run,
> causing lots of confusion and trouble.
>
> I reproduced the error, and I think I've found the cause.  I had his
> package tarball on a network drive, with a local drive being used for
> the session temporary directory.  The check code needs a copy of the
> package installed in the temporary directory, and already has one in
> the pkg.Rcheck directory where the check is taking place, so it tries
> to create a junction linking them.  (On non-Windows systems it uses a
> symlink.)
>
> Apparently the junction creation silently fails:  an empty directory
> appears on the temp dir.  When R loads the package code, it doesn't
> find it in the temp dir, and goes looking in other libraries, where it
> found an older versions of the package.
>
> A workaround for this issue is to set the environment variable
>
>   R_WIN_NO_JUNCTIONS=yes
>
> before doing the check.  This causes the check code to copy all the
> files into the temp dir and things are fine.
>
> I don't know whether the junction creation should have succeeded, or
> whether it should have signalled an error when it didn't, but it might
> make sense for R to do a simple sanity check after trying to create
> the junction (e.g. test for the presence of DESCRIPTION in the newly
> created location), falling back to a copy if things didn't succeed.
>
> Duncan Murdoch
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel