Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check fails #52

Closed
nachti opened this issue Jan 19, 2015 · 11 comments
Closed

check fails #52

nachti opened this issue Jan 19, 2015 · 11 comments

Comments

@nachti
Copy link

nachti commented Jan 19, 2015

Hi Hadley!

Trying to implement my two little functions to stringr (as discussed per mail some time ago), I found the following problem checking the original version first:
If i build stringr using RStudio, everything works as expected, but the check fails throwing the following error:

==> roxygenize('.', roclets=c('rd', 'collate', 'namespace'))

* checking for changes ... ERROR

Error in stri_replace_all_regex(string, pattern, replacement, vectorize_all = vec,  : 
  Missing closing bracket on a bracket expression. (U_REGEX_MISSING_CLOSE_BRACKET)

Using the command line R CMD check fails with this output:

...
* checking examples ... ERROR
Running examples in ‘stringr-Ex.R’ failed
The error most likely occurred in:

> ### Name: case
> ### Title: Convert case of a string.
> ### Aliases: case str_to_lower str_to_title str_to_upper
>
> ### ** Examples
>
> dog <- "The quick brown dog"
> str_to_upper(dog)
[1] "THE QUICK BROWN DOG"
> str_to_lower(dog)
[1] "the quick brown dog"
> str_to_title(dog)
Error in stri_trans_totitle(string, opts_brkiter = stri_opts_brkiter(locale = locale)) :
  The requested ICU resource cannot be found. Possible problem: ICU data has not been downloaded yet. Call `stri_install_check()`. (U_MISSING_RESOURCE_ERROR)
Calls: str_to_title -> stri_trans_totitle -> .Call
Execution halted

Starting R to check the mentioned possible problem gives

> library(stringi)
> stri_install_check()
stringi_0.5.1; en_US.UTF-8; ICU4C 51.2; Unicode 6.2
All tests completed successfully.
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-suse-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] stringi_0.5-1

loaded via a namespace (and not attached):
[1] tools_3.1.1

Cheers,
Gerhard

@hadley
Copy link
Member

hadley commented Jan 19, 2015

It's a bug in roxygen - if you upgrade you should be ok.

On Monday, January 19, 2015, Gerhard Nachtmann notifications@github.com
wrote:

Hi Hadley!

Trying to implement my two little functions to stringr (as discussed per
mail some time ago), I found the following problem checking the original
version first:
If i build stringr using RStudio, everything works as expected, but the
check fails throwing the following error:

==> roxygenize('.', roclets=c('rd', 'collate', 'namespace'))

  • checking for changes ... ERROR

Error in stri_replace_all_regex(string, pattern, replacement, vectorize_all = vec, :
Missing closing bracket on a bracket expression. (U_REGEX_MISSING_CLOSE_BRACKET)

Using the command line R CMD check fails with this output:

...

  • checking examples ... ERROR
    Running examples in ‘stringr-Ex.R’ failed
    The error most likely occurred in:

Name: case

Title: Convert case of a string.

Aliases: case str_to_lower str_to_title str_to_upper

** Examples

dog <- "The quick brown dog"
str_to_upper(dog)
[1] "THE QUICK BROWN DOG"
str_to_lower(dog)
[1] "the quick brown dog"
str_to_title(dog)
Error in stri_trans_totitle(string, opts_brkiter = stri_opts_brkiter(locale = locale)) :
The requested ICU resource cannot be found. Possible problem: ICU data has not been downloaded yet. Call stri_install_check(). (U_MISSING_RESOURCE_ERROR)
Calls: str_to_title -> stri_trans_totitle -> .Call
Execution halted

Starting R to check the mentioned possible problem gives

library(stringi)
stri_install_check()
stringi_0.5.1; en_US.UTF-8; ICU4C 51.2; Unicode 6.2
All tests completed successfully.
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-suse-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] stringi_0.5-1

loaded via a namespace (and not attached):
[1] tools_3.1.1

Cheers,
Gerhard


Reply to this email directly or view it on GitHub
#52.

http://had.co.nz/

@gagolews
Copy link
Contributor

@nachti

> str_to_title(dog)
Error in stri_trans_totitle(string, opts_brkiter = stri_opts_brkiter(locale = locale)) :
  The requested ICU resource cannot be found. Possible problem: ICU data has not been downloaded yet. Call `stri_install_check()`. (U_MISSING_RESOURCE_ERROR)
Calls: str_to_title -> stri_trans_totitle -> .Call
Execution halted

possibly you were offline while compiling stringi. call stri_install_check() as suggested. Otherwise, just download stringi from CRAN

@nachti
Copy link
Author

nachti commented Jan 19, 2015

Thanks for the fast response!

I tried both CRAN and github versions of stringi, but none of them fixed the problem.

> stri_install_check()
stringi_0.5.1; en_US.UTF-8; ICU4C 51.2; Unicode 6.2
All tests completed successfully.

Updates of devtools and roxygen2 did also not help -- I got the same error checking the package.
The new sessionInfo():

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-suse-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] roxygen2_4.1.0.9001

loaded via a namespace (and not attached):
 [1] bitops_1.0-6        devtools_1.7.0.9000 evaluate_0.5.5
 [4] formatR_1.0         httr_0.6.1          knitr_1.8
 [7] magrittr_1.5        Rcpp_0.11.3         RCurl_1.95-4.5
[10] stringi_0.5-1       stringr_0.9.0.9000  tools_3.1.1

~g

@hadley
Copy link
Member

hadley commented Jan 19, 2015

Hmmmmm. Does devtools::document() also fail? If so, can you please include a traceback().

@nachti
Copy link
Author

nachti commented Jan 19, 2015

devtools::document() is working.

> devtools::document()
Updating stringr documentation
Loading stringr

and in RStudio additionally

unloadNamespace("stringr") not successful. Forcing unload.

@gagolews
Copy link
Contributor

@nachti : does the behavior change after a call stri_install_icudt(check = FALSE) + R restart?

@gagolews
Copy link
Contributor

@nachti I suspect that you have icu-devel libs installed on your SuSE, but the icudt package bundle is too limited -- does it work after install.packages("stringi", configure.args="--disable-pkg-config")?
If so, I'll have to write more strict tests for system icudt's features.

@nachti
Copy link
Author

nachti commented Jan 20, 2015

@gagolews It's a SuSE Server at work -- I'm not root there (and I use Debian at home ...)
Yes -- after install.packages("stringi", configure.args="--disable-pkg-config") it worked fine. Now I'm using the CRAN version of stringi again (see updated sessionInfo())
Thanks a lot!

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-suse-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] stringr_0.9.0.9000  magrittr_1.5        stringi_0.4-1       roxygen2_4.1.0.9001

loaded via a namespace (and not attached):
[1] digest_0.6.8 Rcpp_0.11.3  tools_3.1.1 

@gagolews
Copy link
Contributor

@nachti, could you file a bug report at https://github.com/Rexamine/stringi/, please? thx
I guess more strict check for a builtin icudt bundle is needed

@gagolews
Copy link
Contributor

@nachti, as gagolews/stringi#140 is fixed now, is it still an issue?

@nachti
Copy link
Author

nachti commented Jun 24, 2015

Using the most recent version of stringi (0.5-3) the check works fine:

R CMD check stringr_1.0.0.9000.tar.gz
* using log directory ‘/data/home/nachtmann/git/stringr.Rcheck’
* using R version 3.2.0 (2015-04-16)
* using platform: x86_64-suse-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘stringr/DESCRIPTION’ ... OK
* this is package ‘stringr’ version ‘1.0.0.9000’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘stringr’ can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ...
   ‘stringr.Rmd’ using ‘UTF-8’ ... OK
 OK
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

Status: OK

I think the issue could be closed.
Thanks to @gagolews for fixing!

@nachti nachti closed this as completed Jun 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants