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

Use of |> introduces a dependency on R >= 4.1 #128

Closed
sbfnk opened this issue Sep 18, 2024 · 1 comment
Closed

Use of |> introduces a dependency on R >= 4.1 #128

sbfnk opened this issue Sep 18, 2024 · 1 comment

Comments

@sbfnk
Copy link

sbfnk commented Sep 18, 2024

Version 0.5.0 has introduced the use of |> and thus a dependency on R >= 4.1. This could be made explicitly in the DESCRIPTION file or else re-coded (full-text search suggests this only occurs in a few places).

Sorry, no reprex but we see this in GHA for R 4.0 at https://github.com/epiforecasts/scoringutils/actions/runs/10924084855/job/30322278227?pr=915#step:5:3194

  ℹ Building distributional 0.5.0
  ✖ Failed to build distributional 0.5.0 (326ms)
  Error: 
  ! error in pak subprocess
  Caused by error in `stop_task_build(state, worker)`:
  ! Failed to build source package distributional.
  Full installation output:
  * installing *source* package ‘distributional’ ...
  ** package ‘distributional’ successfully unpacked and MD5 sums checked
  staged installation is only possible with locking
  ** using non-staged installation
  ** R
  Error in parse(outFile) : 
    /tmp/Rtmp95ruht/R.INSTALL15992b0796f9/distributional/R/mixture.R:31:41: unexpected '>'
  30: format.dist_mixture <- function(x, width = getOption("width"), ...){
  31:   dists <- lapply(x[["dist"]], format) |>
                                              ^
  ERROR: unable to collate and parse R files for package ‘distributional’
  * removing ‘/tmp/RtmpQt73QS/pkg-lib129017cd62f1/distributional’
  ---
  Backtrace:
  1. pak::lockfile_install(".github/pkg.lock")
  2. pak:::remote(function(...) { …
  3. err$throw(res$error)
  ---
  Subprocess backtrace:
   1. base::withCallingHandlers(cli_message = function(msg) { …
   2. get("lockfile_install_internal", asNamespace("pak"))(...)
   3. plan$install()
   4. pkgdepends::install_package_plan(plan, lib = private$library, num_workers = nw, …
   5. base::withCallingHandlers({ …
   6. pkgdepends:::handle_events(state, events)
   7. pkgdepends:::handle_event(state, i)
   8. pkgdepends:::stop_task(state, worker)
   9. pkgdepends:::stop_task_build(state, worker)
  10. base::throw(pkg_error("Failed to build source package {.pkg {pkg}}.", …
  11. | base::signalCondition(cond)
  12. global (function (e) …
  Execution halted
  Error: Process completed with exit code 1.
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

2 participants