Re: [R-pkg-devel] Question regarding R package development, how to resolve "Warning: no source files found"

2020-02-11 Thread William Dunlap
INSTALL will give that warning if you have a pkg/src directory that
contains no files that look like C, C++, or Fortran files.

Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Tue, Feb 11, 2020 at 11:58 AM Mohsen Nabian 
wrote:

> Greetings!
>
> How to resolve the following warning for my R package after running test
> :system2("R", paste0("CMD INSTALL -l ",Sys.getenv('R_HOME'),"/library ",
> pkg), stdout = "install1.txt", stderr = "install2.txt")
>
>
> Warning result :
>
> "Warning: no source files found"
>
>
> Thanks alot!
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Question regarding R package development, how to resolve "Warning: no source files found"

2020-02-11 Thread Mohsen Nabian
Greetings!

How to resolve the following warning for my R package after running test
:system2("R", paste0("CMD INSTALL -l ",Sys.getenv('R_HOME'),"/library ",
pkg), stdout = "install1.txt", stderr = "install2.txt")


Warning result :

"Warning: no source files found"


Thanks alot!

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Fwd: PDF generation issue from manual page

2020-02-11 Thread Duncan Murdoch

On 11/02/2020 12:33 p.m., neonira Arinoem wrote:

Hi R gurus

Got an issue risen by CRAN about using unknown characters from Latex.

Here is the error message, in the context of PDF generated form manual pages







*Check: PDF version of manual, Result: WARNING   LaTeX errors when creating
PDF version.   This typically indicates Rd problems.   LaTeX errors found:
   ! Undefined control sequence.\blacktriangleright * >



*   l.237 STRATUM $\blacktriangleright
$ LAYER\_3   ! Undefined control sequence.   
\blacktriangleright *




*   l.239 PHASING $\blacktriangleright
$ RUN   ! Undefined control sequence.\blacktriangleright
*

*   l.241 INTENT  $\blacktriangleright
$ FEEDBACK*

I understand that the \blacktriangleright is an unknown control sequence
from latex ... and that sounds strange to me, as I uses it often in
vignettes without any issue so far.
I did some tests on my machine with  R CMD Rd2pdf --force --output=x.pdf
man/*.Rd and it reproduces the issue.

In the incriminated manual page, the code generating this sequence is the
following
*\ifelse{latex}{\out{$\blacktriangleright$}}{\ifelse{html}{\out{}}{\u25b6}}*

Apparently I need to add the \usepackage{amssymb} to the manual page. Do
not know yet, how to achieve this.


As far as I know there's no way for you to do that.  The fact you can do 
it in vignettes isn't relevant:  Rd files are in Rd format, which is not 
LaTeX.  Some LaTeX works when you put it in the \ifelse{latex} macro, 
but there's no guarantee that it all will.


There's one exception to this warning:  if you are building a package 
for yourself, not for CRAN, you can put \usepackage{amssymb} into your 
Rd.cfg file (somewhere on the LaTeX search path).  See the R 
Installation and Administration manual for details.  I don't think 
there's anywhere in your package you could include such a file.


Duncan Murdoch


Yours ideas and hints welcome and this point or  any other solution to this
tricky issue.

I know that I can still change *\backtriangleright* with any available
control sequence and it will work. Indeed, not the way I prefer.
Really wish to get my *\blacktriangleright* display.

Best.
Neonira

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Fwd: PDF generation issue from manual page

2020-02-11 Thread neonira Arinoem
Hi R gurus

Got an issue risen by CRAN about using unknown characters from Latex.

Here is the error message, in the context of PDF generated form manual pages







*Check: PDF version of manual, Result: WARNING   LaTeX errors when creating
PDF version.   This typically indicates Rd problems.   LaTeX errors found:
  ! Undefined control sequence.\blacktriangleright *




*   l.237 STRATUM $\blacktriangleright
$ LAYER\_3   ! Undefined control sequence.   
\blacktriangleright *




*   l.239 PHASING $\blacktriangleright
$ RUN   ! Undefined control sequence.\blacktriangleright
*

*   l.241 INTENT  $\blacktriangleright
$ FEEDBACK*

I understand that the \blacktriangleright is an unknown control sequence
from latex ... and that sounds strange to me, as I uses it often in
vignettes without any issue so far.
I did some tests on my machine with  R CMD Rd2pdf --force --output=x.pdf
man/*.Rd and it reproduces the issue.

In the incriminated manual page, the code generating this sequence is the
following
*\ifelse{latex}{\out{$\blacktriangleright$}}{\ifelse{html}{\out{}}{\u25b6}}*

Apparently I need to add the \usepackage{amssymb} to the manual page. Do
not know yet, how to achieve this.

Yours ideas and hints welcome and this point or  any other solution to this
tricky issue.

I know that I can still change *\backtriangleright* with any available
control sequence and it will work. Indeed, not the way I prefer.
Really wish to get my *\blacktriangleright* display.

Best.
Neonira

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Martin Morgan
I don't have direct experience or responsibility for this code, but it seems 
like R CMD build could instead create a 'whitelist' of files to copy to the 
build location, and do that rather than copying everything and removing things 
that are to be ignored. The basis for a patch might be somewhere in the 
vicinity of

  
https://github.com/wch/r-source/blob/eb84b52444c4afff936852e11233ee84e26eaef1/src/library/tools/R/build.R#L978-L1051

I'm not sure about the reasons for the current approach, though maybe it is 
simpler to implement, more performant, or maybe handles edge cases (like long 
path names or movement across volumes?) better.

Martin Morgan

On 2/11/20, 9:31 AM, "R-package-devel on behalf of Gábor Csárdi" 
 
wrote:

It is actually rather complicated, because .Rbuildignore can have
regular expressions, that refer to files or directories, and for the
latter you need to ignore the whole directory. You can look up in the
R source code how R does it, maybe you can reuse that code.

Here is a quick and dirty function that does it, mostly based on code
from the remotes package. It is very slow for me currently, mainly
because my .git directory has thousands of files. Still faster than
copying a huge directory I guess.

Speeding it up is left as an exercise. :) I think doing a manual
filtering for /.git initially would probably make it fast enough. Oh,
it is also not super tested. :)

without_ignored <- function(path = ".",
extra = c("^\\.git$", "^\\.gitignore$")) {
  paths <- dir(path, recursive = TRUE, all.files = TRUE)
  ignore_file <- file.path(path, ".Rbuildignore")
  ignore <- c(extra, tools:::get_exclude_patterns())

  if (file.exists(ignore_file)) {
ignore <- c(ignore, readLines(ignore_file, warn = FALSE))
  }

  vlapply <- function(X, FUN, ..., USE.NAMES = TRUE) {
vapply(X, FUN, logical(1L), ..., USE.NAMES = USE.NAMES)
  }

  matches_ignores <- function(x) {
any(vlapply(ignore, grepl, x, perl = TRUE, ignore.case = TRUE))
  }

  directories <- function(paths) {
dirs <- unique(dirname(paths))
out <- dirs[dirs != "."]
while(length(dirs) > 0 && any(dirs != ".")) {
  out <- unique(c(out, dirs[dirs != "."]))
  dirs <- unique(dirname(dirs))
}
sort(out)
  }

  # We need to search for the paths as well as directories in the path, so
  # `^foo$` matches `foo/bar`
  should_ignore <- function(path) {
any(vlapply(c(path, directories(path)), matches_ignores))
  }

  paths[! vlapply(paths, should_ignore)]
}

Gabor

On Tue, Feb 11, 2020 at 2:23 PM Ben Bolker  wrote:
>
>
>Something like file.copy( setdiff(list.files(recursive=TRUE)),
> scan(".Rbuildignore", what=character())),  to = destdir) ?
>
> On 2020-02-11 8:50 a.m., Rainer Krug wrote:
> > Thinking about it - what would be the easiest way, to copy the package, 
excluding files in .Rbuidignore, into the temp directory?
> >
> > I would like to use directly the .Rbuildignore file, to exclude the 
files from copying.
> >
> > Any suggestions?
> >
> >
> >> On 11 Feb 2020, at 10:20, Rainer M Krug  wrote:
> >>
> >>
> >>
> >>> On 11 Feb 2020, at 09:54, Gábor Csárdi  wrote:
> >>>
> >>> On Tue, Feb 11, 2020 at 8:52 AM Rainer M Krug  wrote:
>  On 11 Feb 2020, at 09:42, Gábor Csárdi  
wrote:
>  On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  
wrote:
>  On 10 Feb 2020, at 17:58, Gábor Csárdi  
wrote:
> 
>  Maybe you have large, ignored files in the package directory? R first
>  creates a copy of the whole directory and only applies 
`.Rbuildignore`
>  after that.
> 
>  THANKS - you solved my question without me having to answer it. As I 
am using a makefile to build the package, I can easily rename the ignored 
directories before calling build.
> 
>  But the question is why are these ignored directories scanned before 
building the package? They should be ignored anyway?
> 
>  Rainer
> 
> 
>  A makefile is a good idea, but I would rather move the files that are
>  needed to a temporary directory, instead of temporarily renaming
>  unneeded files, because if the makefile fails, then you won't restore
>  them and your project will be in a broken state.
> 
> 
>  You are right. Having two targets (prepare build, finalise build) 
which move the files and put them back afterwards would be the best option (and 
make the build call both).
> 
>  Is there a way to have an .onExit() type function in a makefile?
> >>>
> >>> The on-exit mechanism can fail as well. It is just better not to move
> >>> around the files 

Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Gábor Csárdi
It is actually rather complicated, because .Rbuildignore can have
regular expressions, that refer to files or directories, and for the
latter you need to ignore the whole directory. You can look up in the
R source code how R does it, maybe you can reuse that code.

Here is a quick and dirty function that does it, mostly based on code
from the remotes package. It is very slow for me currently, mainly
because my .git directory has thousands of files. Still faster than
copying a huge directory I guess.

Speeding it up is left as an exercise. :) I think doing a manual
filtering for /.git initially would probably make it fast enough. Oh,
it is also not super tested. :)

without_ignored <- function(path = ".",
extra = c("^\\.git$", "^\\.gitignore$")) {
  paths <- dir(path, recursive = TRUE, all.files = TRUE)
  ignore_file <- file.path(path, ".Rbuildignore")
  ignore <- c(extra, tools:::get_exclude_patterns())

  if (file.exists(ignore_file)) {
ignore <- c(ignore, readLines(ignore_file, warn = FALSE))
  }

  vlapply <- function(X, FUN, ..., USE.NAMES = TRUE) {
vapply(X, FUN, logical(1L), ..., USE.NAMES = USE.NAMES)
  }

  matches_ignores <- function(x) {
any(vlapply(ignore, grepl, x, perl = TRUE, ignore.case = TRUE))
  }

  directories <- function(paths) {
dirs <- unique(dirname(paths))
out <- dirs[dirs != "."]
while(length(dirs) > 0 && any(dirs != ".")) {
  out <- unique(c(out, dirs[dirs != "."]))
  dirs <- unique(dirname(dirs))
}
sort(out)
  }

  # We need to search for the paths as well as directories in the path, so
  # `^foo$` matches `foo/bar`
  should_ignore <- function(path) {
any(vlapply(c(path, directories(path)), matches_ignores))
  }

  paths[! vlapply(paths, should_ignore)]
}

Gabor

On Tue, Feb 11, 2020 at 2:23 PM Ben Bolker  wrote:
>
>
>Something like file.copy( setdiff(list.files(recursive=TRUE)),
> scan(".Rbuildignore", what=character())),  to = destdir) ?
>
> On 2020-02-11 8:50 a.m., Rainer Krug wrote:
> > Thinking about it - what would be the easiest way, to copy the package, 
> > excluding files in .Rbuidignore, into the temp directory?
> >
> > I would like to use directly the .Rbuildignore file, to exclude the files 
> > from copying.
> >
> > Any suggestions?
> >
> >
> >> On 11 Feb 2020, at 10:20, Rainer M Krug  wrote:
> >>
> >>
> >>
> >>> On 11 Feb 2020, at 09:54, Gábor Csárdi  wrote:
> >>>
> >>> On Tue, Feb 11, 2020 at 8:52 AM Rainer M Krug  wrote:
>  On 11 Feb 2020, at 09:42, Gábor Csárdi  wrote:
>  On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  wrote:
>  On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
> 
>  Maybe you have large, ignored files in the package directory? R first
>  creates a copy of the whole directory and only applies `.Rbuildignore`
>  after that.
> 
>  THANKS - you solved my question without me having to answer it. As I am 
>  using a makefile to build the package, I can easily rename the ignored 
>  directories before calling build.
> 
>  But the question is why are these ignored directories scanned before 
>  building the package? They should be ignored anyway?
> 
>  Rainer
> 
> 
>  A makefile is a good idea, but I would rather move the files that are
>  needed to a temporary directory, instead of temporarily renaming
>  unneeded files, because if the makefile fails, then you won't restore
>  them and your project will be in a broken state.
> 
> 
>  You are right. Having two targets (prepare build, finalise build) which 
>  move the files and put them back afterwards would be the best option 
>  (and make the build call both).
> 
>  Is there a way to have an .onExit() type function in a makefile?
> >>>
> >>> The on-exit mechanism can fail as well. It is just better not to move
> >>> around the files of the project I think.
> >>
> >> True.
> >>
> >> Thanks,
> >>
> >> Rainer
> >>
> >>>
> >>> Gabor
> >>>
> >>> [...]
> >>
> >> --
> >> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
> >> Biology, UCT), Dipl. Phys. (Germany)
> >>
> >> Orcid ID: -0002-7490-0066
> >>
> >> Department of Evolutionary Biology and Environmental Studies
> >> University of Zürich
> >> Office Y34-J-74
> >> Winterthurerstrasse 190
> >> 8075 Zürich
> >> Switzerland
> >>
> >> Office:  +41 (0)44 635 47 64
> >> Cell:+41 (0)78 630 66 57
> >> email:  rainer.k...@uzh.ch
> >>  rai...@krugs.de
> >> Skype: RMkrug
> >>
> >> PGP: 0x0F52F982
> >>
> >>
> >>
> >>
> >>  [[alternative HTML version deleted]]
> >>
> >> __
> >> R-package-devel@r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >
> > --
> > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
> > UCT), Dipl. Phys. (Germany)
> >
> > Orcid ID: -0002-7490-0066
> >
> > Department of Evolutionary Biology 

Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Ben Bolker


   Something like file.copy( setdiff(list.files(recursive=TRUE)),
scan(".Rbuildignore", what=character())),  to = destdir) ?

On 2020-02-11 8:50 a.m., Rainer Krug wrote:
> Thinking about it - what would be the easiest way, to copy the package, 
> excluding files in .Rbuidignore, into the temp directory?
> 
> I would like to use directly the .Rbuildignore file, to exclude the files 
> from copying.
> 
> Any suggestions?
> 
> 
>> On 11 Feb 2020, at 10:20, Rainer M Krug  wrote:
>>
>>
>>
>>> On 11 Feb 2020, at 09:54, Gábor Csárdi  wrote:
>>>
>>> On Tue, Feb 11, 2020 at 8:52 AM Rainer M Krug  wrote:
 On 11 Feb 2020, at 09:42, Gábor Csárdi  wrote:
 On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  wrote:
 On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:

 Maybe you have large, ignored files in the package directory? R first
 creates a copy of the whole directory and only applies `.Rbuildignore`
 after that.

 THANKS - you solved my question without me having to answer it. As I am 
 using a makefile to build the package, I can easily rename the ignored 
 directories before calling build.

 But the question is why are these ignored directories scanned before 
 building the package? They should be ignored anyway?

 Rainer


 A makefile is a good idea, but I would rather move the files that are
 needed to a temporary directory, instead of temporarily renaming
 unneeded files, because if the makefile fails, then you won't restore
 them and your project will be in a broken state.


 You are right. Having two targets (prepare build, finalise build) which 
 move the files and put them back afterwards would be the best option (and 
 make the build call both).

 Is there a way to have an .onExit() type function in a makefile?
>>>
>>> The on-exit mechanism can fail as well. It is just better not to move
>>> around the files of the project I think.
>>
>> True.
>>
>> Thanks,
>>
>> Rainer
>>
>>>
>>> Gabor
>>>
>>> [...]
>>
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
>> UCT), Dipl. Phys. (Germany)
>>
>> Orcid ID: -0002-7490-0066
>>
>> Department of Evolutionary Biology and Environmental Studies
>> University of Zürich
>> Office Y34-J-74
>> Winterthurerstrasse 190
>> 8075 Zürich
>> Switzerland
>>
>> Office:  +41 (0)44 635 47 64
>> Cell:+41 (0)78 630 66 57
>> email:  rainer.k...@uzh.ch
>>  rai...@krugs.de
>> Skype: RMkrug
>>
>> PGP: 0x0F52F982
>>
>>
>>
>>
>>  [[alternative HTML version deleted]]
>>
>> __
>> R-package-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
> UCT), Dipl. Phys. (Germany)
> 
> Orcid ID: -0002-7490-0066
> 
> Department of Evolutionary Biology and Environmental Studies
> University of Zürich
> Office Y34-J-74
> Winterthurerstrasse 190
> 8075 Zürich
> Switzerland
> 
> Office:   +41 (0)44 635 47 64
> Cell: +41 (0)78 630 66 57
> email:  rainer.k...@uzh.ch
>   rai...@krugs.de
> Skype: RMkrug
> 
> PGP: 0x0F52F982
> 
> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Rainer Krug
Thinking about it - what would be the easiest way, to copy the package, 
excluding files in .Rbuidignore, into the temp directory?

I would like to use directly the .Rbuildignore file, to exclude the files from 
copying.

Any suggestions?


> On 11 Feb 2020, at 10:20, Rainer M Krug  wrote:
> 
> 
> 
>> On 11 Feb 2020, at 09:54, Gábor Csárdi  wrote:
>> 
>> On Tue, Feb 11, 2020 at 8:52 AM Rainer M Krug  wrote:
>>> On 11 Feb 2020, at 09:42, Gábor Csárdi  wrote:
>>> On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  wrote:
>>> On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
>>> 
>>> Maybe you have large, ignored files in the package directory? R first
>>> creates a copy of the whole directory and only applies `.Rbuildignore`
>>> after that.
>>> 
>>> THANKS - you solved my question without me having to answer it. As I am 
>>> using a makefile to build the package, I can easily rename the ignored 
>>> directories before calling build.
>>> 
>>> But the question is why are these ignored directories scanned before 
>>> building the package? They should be ignored anyway?
>>> 
>>> Rainer
>>> 
>>> 
>>> A makefile is a good idea, but I would rather move the files that are
>>> needed to a temporary directory, instead of temporarily renaming
>>> unneeded files, because if the makefile fails, then you won't restore
>>> them and your project will be in a broken state.
>>> 
>>> 
>>> You are right. Having two targets (prepare build, finalise build) which 
>>> move the files and put them back afterwards would be the best option (and 
>>> make the build call both).
>>> 
>>> Is there a way to have an .onExit() type function in a makefile?
>> 
>> The on-exit mechanism can fail as well. It is just better not to move
>> around the files of the project I think.
> 
> True.
> 
> Thanks,
> 
> Rainer
> 
>> 
>> Gabor
>> 
>> [...]
> 
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
> UCT), Dipl. Phys. (Germany)
> 
> Orcid ID: -0002-7490-0066
> 
> Department of Evolutionary Biology and Environmental Studies
> University of Zürich
> Office Y34-J-74
> Winterthurerstrasse 190
> 8075 Zürich
> Switzerland
> 
> Office:   +41 (0)44 635 47 64
> Cell: +41 (0)78 630 66 57
> email:  rainer.k...@uzh.ch
>   rai...@krugs.de
> Skype: RMkrug
> 
> PGP: 0x0F52F982
> 
> 
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Orcid ID: -0002-7490-0066

Department of Evolutionary Biology and Environmental Studies
University of Zürich
Office Y34-J-74
Winterthurerstrasse 190
8075 Zürich
Switzerland

Office: +41 (0)44 635 47 64
Cell:   +41 (0)78 630 66 57
email:  rainer.k...@uzh.ch
rai...@krugs.de
Skype: RMkrug

PGP: 0x0F52F982




[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] [EXTERNAL] R CMD build hanging for some but not all packages

2020-02-11 Thread Rainer M Krug
Yes - I would suggest that this would be a useful change. As the files in 
.Rbuildignore are ignored anyway during build. So the ignoring could be done at 
the copying stage and not during the building stage?

Rainer


> On 11 Feb 2020, at 13:20, Hong Ooi  wrote:
> 
> They are scanned probably because R CMD build does something like cp * to 
> copy everything to a temp folder first up, before processing it. An argument 
> could be made that it should manually loop through all files and dirs, 
> checking each against .Rbuildignore before copying.
> 
> 
> From: Rainer M Krug  
> Sent: Tuesday, 11 February 2020 7:38 PM
> To: Gábor Csárdi 
> Cc: Hong Ooi ; r-package-devel@r-project.org
> Subject: [EXTERNAL] Re: [R-pkg-devel] R CMD build hanging for some but not 
> all packages
> 
> 
> 
> 
> On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
> 
> Maybe you have large, ignored files in the package directory? R first
> creates a copy of the whole directory and only applies `.Rbuildignore`
> after that.
> 
> 
> 
> THANKS - you solved my question without me having to answer it. As I am using 
> a makefile to build the package, I can easily rename the ignored directories 
> before calling build.
> 
> But the question is why are these ignored directories scanned before building 
> the package? They should be ignored anyway?
> 
> Rainer
> 
> 
> 
> 
> Gabor
> 
> On Mon, Feb 10, 2020 at 4:54 PM Hong Ooi via R-package-devel
>  wrote:
> 
> 
> Actually, cancel that: it finished successfully, but took 3 minutes to 
> prepare the package:
> 
> r$> devtools::build()
> v  checking for file 'C:\Users\hongo\Documents\GitHub\AzureStor/DESCRIPTION'
> -  preparing 'AzureStor': (3m 4s)
> v  checking DESCRIPTION meta-information ...
> -  installing the package to build vignettes
> v  creating vignettes (6.5s)
> -  checking for LF line-endings in source and make files and shell scripts 
> (13.8s)
> -  checking for empty or unneeded directories
> -  building 'AzureStor_3.1.0.9000.tar.gz'
> 
> This is really weird, I'm used to the package prep step taking 10 seconds at 
> most.
> 
> 
> -Original Message-
> From: R-package-devel  On 
> Behalf Of Hong Ooi via R-package-devel
> Sent: Tuesday, 11 February 2020 3:50 AM
> To: mailto:r-package-devel@r-project.org
> Subject: [EXTERNAL] [R-pkg-devel] R CMD build hanging for some but not all 
> packages
> 
> This is with R 3.6.2 on Windows 10 Pro 1909.
> 
> In the last couple of weeks, devtools::build() and devtools::check() have 
> started hanging on some, but not all, of my packages. After some poking 
> around, I discovered that it's actually R CMD build that is having problems, 
> right after the "checking for file 'DESCRIPTION'" step.
> 
> A reproducible example can be found by cloning my AzureStor package: 
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2FAzureStor=02%7C01%7Chongooi%40microsoft.com%7C7962d328eb984556a2e708d7aecdc0db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170071036915332=cmY0VPEiEgcuhI%2B4wIT8iIimQhq7751IJ0KHdsPaMtg%3D=0
>  If you run "R CMD build ." in the package directory, it should hang. This is 
> a relatively simple package that doesn't require compilation, although it 
> does import some commonly-used packages like httr, curl, jsonlite and xml2.
> 
> As far as I can tell, R on Ubuntu works fine. What's going on?
> 
> __
> mailto:R-package-devel@r-project.org mailing list
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-devel=02%7C01%7Chongooi%40microsoft.com%7C7962d328eb984556a2e708d7aecdc0db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170071036925320=XbCKzK3no6v5asG5assjd7oxy%2BOk9or2LbS%2Fkg8GESw%3D=0
> 
> __
> mailto:R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
> __
> mailto:R-package-devel@r-project.org mailing list
> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-devel=02%7C01%7Chongooi%40microsoft.com%7C7962d328eb984556a2e708d7aecdc0db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170071036925320=XbCKzK3no6v5asG5assjd7oxy%2BOk9or2LbS%2Fkg8GESw%3D=0
> 
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
> UCT), Dipl. Phys. (Germany)
> Orcid ID: -0002-7490-0066
> 
> Department of Evolutionary Biology and Environmental Studies
> University of Zürich
> Office Y34-J-74
> Winterthurerstrasse 190
> 8075 Zürich
> Switzerland
> 
> Office:   +41 (0)44 635 47 64
> Cell: +41 (0)78 630 66 57
> mailto:rainer.k...@uzh.ch
>   mailto:rai...@krugs.de
> Skype: RMkrug
> 
> PGP: 0x0F52F982
> 
> 

--
Rainer M. Krug, PhD (Conservation 

Re: [R-pkg-devel] [EXTERNAL] Re: R CMD build hanging for some but not all packages

2020-02-11 Thread Hong Ooi via R-package-devel
They are scanned probably because R CMD build does something like cp * to copy 
everything to a temp folder first up, before processing it. An argument could 
be made that it should manually loop through all files and dirs, checking each 
against .Rbuildignore before copying.


From: Rainer M Krug  
Sent: Tuesday, 11 February 2020 7:38 PM
To: Gábor Csárdi 
Cc: Hong Ooi ; r-package-devel@r-project.org
Subject: [EXTERNAL] Re: [R-pkg-devel] R CMD build hanging for some but not all 
packages




On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:

Maybe you have large, ignored files in the package directory? R first
creates a copy of the whole directory and only applies `.Rbuildignore`
after that.



THANKS - you solved my question without me having to answer it. As I am using a 
makefile to build the package, I can easily rename the ignored directories 
before calling build.

But the question is why are these ignored directories scanned before building 
the package? They should be ignored anyway?

Rainer




Gabor

On Mon, Feb 10, 2020 at 4:54 PM Hong Ooi via R-package-devel
 wrote:


Actually, cancel that: it finished successfully, but took 3 minutes to prepare 
the package:

r$> devtools::build()
v  checking for file 'C:\Users\hongo\Documents\GitHub\AzureStor/DESCRIPTION'
-  preparing 'AzureStor': (3m 4s)
v  checking DESCRIPTION meta-information ...
-  installing the package to build vignettes
v  creating vignettes (6.5s)
-  checking for LF line-endings in source and make files and shell scripts 
(13.8s)
-  checking for empty or unneeded directories
-  building 'AzureStor_3.1.0.9000.tar.gz'

This is really weird, I'm used to the package prep step taking 10 seconds at 
most.


-Original Message-
From: R-package-devel  On Behalf 
Of Hong Ooi via R-package-devel
Sent: Tuesday, 11 February 2020 3:50 AM
To: mailto:r-package-devel@r-project.org
Subject: [EXTERNAL] [R-pkg-devel] R CMD build hanging for some but not all 
packages

This is with R 3.6.2 on Windows 10 Pro 1909.

In the last couple of weeks, devtools::build() and devtools::check() have 
started hanging on some, but not all, of my packages. After some poking around, 
I discovered that it's actually R CMD build that is having problems, right 
after the "checking for file 'DESCRIPTION'" step.

A reproducible example can be found by cloning my AzureStor package: 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2FAzureStor=02%7C01%7Chongooi%40microsoft.com%7C7962d328eb984556a2e708d7aecdc0db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170071036915332=cmY0VPEiEgcuhI%2B4wIT8iIimQhq7751IJ0KHdsPaMtg%3D=0
 If you run "R CMD build ." in the package directory, it should hang. This is a 
relatively simple package that doesn't require compilation, although it does 
import some commonly-used packages like httr, curl, jsonlite and xml2.

As far as I can tell, R on Ubuntu works fine. What's going on?

__
mailto:R-package-devel@r-project.org mailing list
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-devel=02%7C01%7Chongooi%40microsoft.com%7C7962d328eb984556a2e708d7aecdc0db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170071036925320=XbCKzK3no6v5asG5assjd7oxy%2BOk9or2LbS%2Fkg8GESw%3D=0

__
mailto:R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
mailto:R-package-devel@r-project.org mailing list
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-devel=02%7C01%7Chongooi%40microsoft.com%7C7962d328eb984556a2e708d7aecdc0db%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637170071036925320=XbCKzK3no6v5asG5assjd7oxy%2BOk9or2LbS%2Fkg8GESw%3D=0

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)
Orcid ID: -0002-7490-0066

Department of Evolutionary Biology and Environmental Studies
University of Zürich
Office Y34-J-74
Winterthurerstrasse 190
8075 Zürich
Switzerland

Office: +41 (0)44 635 47 64
Cell:       +41 (0)78 630 66 57
mailto:rainer.k...@uzh.ch
mailto:rai...@krugs.de
Skype:     RMkrug

PGP: 0x0F52F982


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Rainer M Krug



> On 11 Feb 2020, at 09:54, Gábor Csárdi  wrote:
> 
> On Tue, Feb 11, 2020 at 8:52 AM Rainer M Krug  wrote:
>> On 11 Feb 2020, at 09:42, Gábor Csárdi  wrote:
>> On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  wrote:
>> On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
>> 
>> Maybe you have large, ignored files in the package directory? R first
>> creates a copy of the whole directory and only applies `.Rbuildignore`
>> after that.
>> 
>> THANKS - you solved my question without me having to answer it. As I am 
>> using a makefile to build the package, I can easily rename the ignored 
>> directories before calling build.
>> 
>> But the question is why are these ignored directories scanned before 
>> building the package? They should be ignored anyway?
>> 
>> Rainer
>> 
>> 
>> A makefile is a good idea, but I would rather move the files that are
>> needed to a temporary directory, instead of temporarily renaming
>> unneeded files, because if the makefile fails, then you won't restore
>> them and your project will be in a broken state.
>> 
>> 
>> You are right. Having two targets (prepare build, finalise build) which move 
>> the files and put them back afterwards would be the best option (and make 
>> the build call both).
>> 
>> Is there a way to have an .onExit() type function in a makefile?
> 
> The on-exit mechanism can fail as well. It is just better not to move
> around the files of the project I think.

True.

Thanks,

Rainer

> 
> Gabor
> 
> [...]

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Orcid ID: -0002-7490-0066

Department of Evolutionary Biology and Environmental Studies
University of Zürich
Office Y34-J-74
Winterthurerstrasse 190
8075 Zürich
Switzerland

Office: +41 (0)44 635 47 64
Cell:   +41 (0)78 630 66 57
email:  rainer.k...@uzh.ch
rai...@krugs.de
Skype: RMkrug

PGP: 0x0F52F982




[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Gábor Csárdi
On Tue, Feb 11, 2020 at 8:52 AM Rainer M Krug  wrote:
> On 11 Feb 2020, at 09:42, Gábor Csárdi  wrote:
> On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  wrote:
> On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
>
> Maybe you have large, ignored files in the package directory? R first
> creates a copy of the whole directory and only applies `.Rbuildignore`
> after that.
>
> THANKS - you solved my question without me having to answer it. As I am using 
> a makefile to build the package, I can easily rename the ignored directories 
> before calling build.
>
> But the question is why are these ignored directories scanned before building 
> the package? They should be ignored anyway?
>
> Rainer
>
>
> A makefile is a good idea, but I would rather move the files that are
> needed to a temporary directory, instead of temporarily renaming
> unneeded files, because if the makefile fails, then you won't restore
> them and your project will be in a broken state.
>
>
> You are right. Having two targets (prepare build, finalise build) which move 
> the files and put them back afterwards would be the best option (and make the 
> build call both).
>
> Is there a way to have an .onExit() type function in a makefile?

The on-exit mechanism can fail as well. It is just better not to move
around the files of the project I think.

Gabor

[...]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Rainer M Krug



> On 11 Feb 2020, at 09:42, Gábor Csárdi  wrote:
> 
> On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  > wrote:
>> 
>> 
>> 
>> On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
>> 
>> Maybe you have large, ignored files in the package directory? R first
>> creates a copy of the whole directory and only applies `.Rbuildignore`
>> after that.
>> 
>> THANKS - you solved my question without me having to answer it. As I am 
>> using a makefile to build the package, I can easily rename the ignored 
>> directories before calling build.
>> 
>> But the question is why are these ignored directories scanned before 
>> building the package? They should be ignored anyway?
>> 
>> Rainer
> 
> A makefile is a good idea, but I would rather move the files that are
> needed to a temporary directory, instead of temporarily renaming
> unneeded files, because if the makefile fails, then you won't restore
> them and your project will be in a broken state.

You are right. Having two targets (prepare build, finalise build) which move 
the files and put them back afterwards would be the best option (and make the 
build call both).

Is there a way to have an .onExit() type function in a makefile?

Rainer


> 
> Gabor
> 
> [...]

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Orcid ID: -0002-7490-0066

Department of Evolutionary Biology and Environmental Studies
University of Zürich
Office Y34-J-74
Winterthurerstrasse 190
8075 Zürich
Switzerland

Office: +41 (0)44 635 47 64
Cell:   +41 (0)78 630 66 57
email:  rainer.k...@uzh.ch
rai...@krugs.de
Skype: RMkrug

PGP: 0x0F52F982




[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Gábor Csárdi
On Tue, Feb 11, 2020 at 8:38 AM Rainer M Krug  wrote:
>
>
>
> On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
>
> Maybe you have large, ignored files in the package directory? R first
> creates a copy of the whole directory and only applies `.Rbuildignore`
> after that.
>
> THANKS - you solved my question without me having to answer it. As I am using 
> a makefile to build the package, I can easily rename the ignored directories 
> before calling build.
>
> But the question is why are these ignored directories scanned before building 
> the package? They should be ignored anyway?
>
> Rainer

A makefile is a good idea, but I would rather move the files that are
needed to a temporary directory, instead of temporarily renaming
unneeded files, because if the makefile fails, then you won't restore
them and your project will be in a broken state.

Gabor

[...]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build hanging for some but not all packages

2020-02-11 Thread Rainer M Krug



> On 10 Feb 2020, at 17:58, Gábor Csárdi  wrote:
> 
> Maybe you have large, ignored files in the package directory? R first
> creates a copy of the whole directory and only applies `.Rbuildignore`
> after that.



THANKS - you solved my question without me having to answer it. As I am using a 
makefile to build the package, I can easily rename the ignored directories 
before calling build.

But the question is why are these ignored directories scanned before building 
the package? They should be ignored anyway?

Rainer


> 
> Gabor
> 
> On Mon, Feb 10, 2020 at 4:54 PM Hong Ooi via R-package-devel
>  wrote:
>> 
>> Actually, cancel that: it finished successfully, but took 3 minutes to 
>> prepare the package:
>> 
>> r$> devtools::build()
>> v  checking for file 'C:\Users\hongo\Documents\GitHub\AzureStor/DESCRIPTION'
>> -  preparing 'AzureStor': (3m 4s)
>> v  checking DESCRIPTION meta-information ...
>> -  installing the package to build vignettes
>> v  creating vignettes (6.5s)
>> -  checking for LF line-endings in source and make files and shell scripts 
>> (13.8s)
>> -  checking for empty or unneeded directories
>> -  building 'AzureStor_3.1.0.9000.tar.gz'
>> 
>> This is really weird, I'm used to the package prep step taking 10 seconds at 
>> most.
>> 
>> 
>> -Original Message-
>> From: R-package-devel  On Behalf Of 
>> Hong Ooi via R-package-devel
>> Sent: Tuesday, 11 February 2020 3:50 AM
>> To: r-package-devel@r-project.org
>> Subject: [EXTERNAL] [R-pkg-devel] R CMD build hanging for some but not all 
>> packages
>> 
>> This is with R 3.6.2 on Windows 10 Pro 1909.
>> 
>> In the last couple of weeks, devtools::build() and devtools::check() have 
>> started hanging on some, but not all, of my packages. After some poking 
>> around, I discovered that it's actually R CMD build that is having problems, 
>> right after the "checking for file 'DESCRIPTION'" step.
>> 
>> A reproducible example can be found by cloning my AzureStor package: 
>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2FAzureStordata=02%7C01%7Chongooi%40microsoft.com%7Cae76a58d39b64b491a1008d7ae4955a9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637169502304943506sdata=RW3TQM2D%2F3X43oGhiywDyKd%2F4oo5hFkOoVwZTUe9cOw%3Dreserved=0
>>  If you run "R CMD build ." in the package directory, it should hang. This 
>> is a relatively simple package that doesn't require compilation, although it 
>> does import some commonly-used packages like httr, curl, jsonlite and xml2.
>> 
>> As far as I can tell, R on Ubuntu works fine. What's going on?
>> 
>> __
>> R-package-devel@r-project.org mailing list
>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-develdata=02%7C01%7Chongooi%40microsoft.com%7Cae76a58d39b64b491a1008d7ae4955a9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637169502304943506sdata=DPyD6zGGcxq41irkaMfMLyjnmqSB96PiIxIh9N2p%2Ft4%3Dreserved=0
>> 
>> __
>> R-package-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Orcid ID: -0002-7490-0066

Department of Evolutionary Biology and Environmental Studies
University of Zürich
Office Y34-J-74
Winterthurerstrasse 190
8075 Zürich
Switzerland

Office: +41 (0)44 635 47 64
Cell:   +41 (0)78 630 66 57
email:  rainer.k...@uzh.ch
rai...@krugs.de
Skype: RMkrug

PGP: 0x0F52F982




[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel