tidyverse / reprex

Render bits of R code for sharing, e.g., on GitHub or StackOverflow.

Home Page:https://reprex.tidyverse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in xfun::normalize_path() : unused argument (resolve_symlink = FALSE)

MatthieuStigler opened this issue · comments

This is mainly there for discoverability, feel free to close.

Running reprex() with package xfun <0.36, I got an error running a reprex:

Error in xfun::normalize_path(path, ..., must_work = must_work, resolve_symlink = FALSE) :
unused argument (resolve_symlink = FALSE)

Issue was solved updating xfun to latest, but is it possible there's an undeclared (indirect) dependency to xfun 0.3.6?

pak::pkg_deps_explain("reprex", "xfun")
#> reprex -> knitr -> highr -> xfun
#> reprex -> knitr -> xfun
#> reprex -> rmarkdown -> knitr -> highr -> xfun
#> reprex -> rmarkdown -> knitr -> xfun
#> reprex -> rmarkdown -> tinytex -> xfun
#> reprex -> rmarkdown -> xfun

reprex has no direct relationship or usage of xfun. So that suggests the problem (somebody isn't declaring the right minimum version of xfun) is probably elsewhere. I just downgraded to xfun 0.35 and I can still reprex(). So it sounds like this must require other involved packages to also be at specific versions.

Maybe compare my results to yours:

packageVersion("reprex")
#> [1] '2.0.2.9000'
packageVersion("xfun")
#> [1] '0.35'
packageVersion("highr")
#> [1] '0.10'
packageVersion("knitr")
#> [1] '1.41'
packageVersion("rmarkdown")
#> [1] '2.19'

Created on 2023-01-24 with reprex v2.0.2.9000

ok, it seems indeed the culprit lies on the side of highr, which I had at 0.9. Upgrading it to 0.10 with xfun 0.35 solves the issue also. So curiously, it seems it is the combo highr 0.9 and xfun 0.35 that triggers the issue for me (I hadn't put a reprex, since wasn't working, but even I could not reprex code as iris)