AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
40 stars 2 forks source link

Installation issue #238

Closed williamlai2 closed 5 months ago

williamlai2 commented 5 months ago

Describe the bug When I try to install galah, I get this error:

* installing *source* package 'galah' ...
** package 'galah' successfully unpacked and MD5 sums checked
** using staged installation
** R
Error in parse(outFile) : 
  C:/Users/laiw/AppData/Local/Temp/RtmpGUMgpI/R.INSTALL389cf7b3b46/galah/R/build.R:157:27: unexpected input
156:                                      x = filters$query[!is_equals]) |>
157:       sub("\\]$", "", x = _
                               ^
ERROR: unable to collate and parse R files for package 'galah'
* removing 'C:/Users/laiw/Documents/R/win-library/4.1/galah'
Warning in install.packages :
  installation of package ‘galah’ had non-zero exit status

Which is in here https://github.com/AtlasOfLivingAustralia/galah-R/blob/main/R/build.R

Should the underscore be in quotes?

galah version I tried with the version on CRAN as well as the development version. Both seem to be 2.0.2

To Reproduce install.packages("galah")

Expected behaviour It should install without an error.

Additional context

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                       LC_TIME=English_Australia.1252    

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

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.10        pillar_1.9.0       compiler_4.1.2     base64enc_0.1-3    class_7.3-19       tools_4.1.2        digest_0.6.35      tibble_3.2.1       satellite_1.0.4   
[10] lifecycle_1.0.4    lattice_0.21-8     pkgconfig_2.0.3    png_0.1-8          rlang_1.1.3        cli_3.6.2          DBI_1.2.2          rstudioapi_0.15.0  crosstalk_1.2.1   
[19] fastmap_1.1.1      terra_1.7-29       e1071_1.7-14       dplyr_1.1.4        raster_3.6-23      generics_0.1.3     htmlwidgets_1.5.4  vctrs_0.6.5        tidyselect_1.2.1  
[28] stats4_4.1.2       classInt_0.4-10    leaflet_2.2.1      grid_4.1.2         glue_1.6.2         sf_1.0-15          R6_2.5.1           fansi_1.0.6        sp_2.1-2          
[37] magrittr_2.0.3     scales_1.3.0       codetools_0.2-18   htmltools_0.5.7    units_0.8-0        colorspace_2.1-0   mapview_2.11.2     utf8_1.2.2         KernSmooth_2.23-20
[46] proxy_0.4-27       munsell_0.5.0      leafem_0.2.3  
mjwestgate commented 5 months ago

Thanks for reporting this William! That’s an odd one; obviously the tests didn’t pick it up, but there isn’t an obvious syntax error either. I notice you’re on an older version of R; does this persist in more recent versions?

williamlai2 commented 5 months ago

Thanks Martin. That was on the work computer. But I haven't ever seen that issue on any other packages.

I'm running on 4.3.1 at home and it installed fine on there.

mjwestgate commented 5 months ago

OK in that case I'm gonna treat this as an issue with legacy versions of R and close it; we test on current, development and one previous version of R by default, so this is pretty far outside of our support window. Interesting that the issue in question is with native pipes, which should be supported for all versions of R from 4.0 onwards.