jimmyday12 / fitzRoy

A set of functions to easily access AFL data
https://jimmyday12.github.io/fitzRoy
Other
125 stars 27 forks source link

Failed upgrade to v1.4.0 #227

Closed jaytaytay closed 1 week ago

jaytaytay commented 1 week ago

Attempting to update from v1.3.0 to v1.4.0, I get this error.


> install.packages("fitzRoy")

  There is a binary version available but the source version is later:
        binary source needs_compilation
fitzRoy  1.1.0  1.4.0             FALSE

installing the source package ‘fitzRoy’

trying URL 'https://cran.rstudio.com/src/contrib/fitzRoy_1.4.0.tar.gz'
Content type 'application/x-gzip' length 1122109 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

* installing *source* package ‘fitzRoy’ ...
** package ‘fitzRoy’ successfully unpacked and MD5 sums checked
** using staged installation
** R
Error in parse(outFile) : 
  /private/var/folders/1n/q8yyl7_s3_92qm1px0_jbq9w0000gn/T/RtmpM5Fh3a/R.INSTALLdaff1254d78f/fitzRoy/R/fetch-fixture.R:137:79: unexpected '>'
136:   # Build request
137:   req <- httr2::request("https://www.footywire.com/afl/footy/ft_match_list") |>
                                                                                   ^
ERROR: unable to collate and parse R files for package ‘fitzRoy’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/fitzRoy’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/fitzRoy’
Warning in install.packages :
  installation of package ‘fitzRoy’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/1n/q8yyl7_s3_92qm1px0_jbq9w0000gn/T/RtmpcXhFW2/downloaded_packages’```
jaytaytay commented 1 week ago

install.packages("fitzRoy", dependencies = TRUE) also gave the same error.

jaytaytay commented 1 week ago

I tried installing from the tarball on the github release page... install.packages('~/fitzRoy-1.4.0.tar.gz', repos = NULL, type="source") Same error.

jimmyday12 commented 1 week ago

I can't replicate this locally and all of the tests that run on various devices (windows, macos, linux) are also able to install the package fine. Also nothing noted on CRAN who would let me know

jaytaytay commented 1 week ago

Ok, good to know, Thanks @jimmyday12. I'll continue to troubleshoot and report back.

jimmyday12 commented 1 week ago

Actually looking at your error logs, I suspect you are on an old version of R that doesn't support the new Pipe operator (|>) since it doesn't seem to recognise that character.

This was introduced in R 4.1 at the start of 2021 so if you update R to anything later than that you should be ok. Let me know how you go and I'll look to put a minimum supported version in the package

jaytaytay commented 1 week ago

I was using R v4.0.5. I updated to R v4.2.3 and this upgrade now works 🎉 I did check the minimum required R version for fitzRoy on CRAN docs, which indicated >=3.5, so I expected 4.0.5 to be ok. Perhaps this could be updated to better reflect the minimum version required.

Thanks for your prompt response ❤️