r-lib / pkgdepends

R Package Dependency Resolution
https://r-lib.github.io/pkgdepends/
Other
102 stars 30 forks source link

Can't install bslib or shiny with dependencies=TRUE #232

Closed wch closed 3 years ago

wch commented 3 years ago
>  pak::pkg_install("rstudio/shiny", dependencies = TRUE, ask=F)

→ Will update 2 packages.
→ Will download 2 packages with unknown size.
+ shiny     1.5.0.9006 → 1.5.0.9007 👷🏾‍♀️🔧 ⬇ (GitHub: 5b27d92)
+ shinytest 1.4.0.9002 → 1.4.0.9003 👷🏻🔧 ⬇ (GitHub: 5b566d1)

! shiny is loaded in the current R session, you probably need to restart R
  after the installation.

ℹ Getting 2 pkgs with unknown sizes
✓ Cached copy of shiny 1.5.0.9007 (source) is the latest build
✓ Cached copy of shinytest 1.4.0.9003 (source) is the latest build
✓ No downloads needed, all packages are cached                     
Error: Internal error, no task running and cannot select new task
Type .Last.error.trace to see where the error occured
jimhester commented 3 years ago

I can reproduce this, but only when using dependencies = TRUE. Just pak::pkg_install("rstudio/shiny", ask = FALSE) works.

wch commented 3 years ago

I wonder if it has to do with circular "soft" dependencies (with Suggests and Remotes), like r-lib/pkgdepends#229.

As mentioned above, installing shiny failed. But then I was able to get shinytest to work, and after that, I was able to install shiny:

pak::pkg_install("rstudio/shiny", dependencies = TRUE, ask=F)     # Error
pak::pkg_install("rstudio/shinytest", dependencies = TRUE, ask=F) # OK
pak::pkg_install("rstudio/shiny", dependencies = TRUE, ask=F)     # OK
jimhester commented 3 years ago

Yeah, just put the remote on only one or the other, not in both directions.

gaborcsardi commented 3 years ago

That issue is not about circular soft dependencies, though (https://github.com/r-lib/pkgdepends/issues/229#issuecomment-750420633), and I doubt that this one is. In general circular soft dependencies are not a problem for the solver, and the installer does not use soft dependencies.

I believe this is a much more mundane thinko bug. Will look at it in a minute.

gaborcsardi commented 3 years ago

Fixed by c3ea8c52ebb0bed5b6bcd1b3f422a47cd451d36a

gaborcsardi commented 3 years ago

@wch these binaries should be better: https://github.com/r-lib/pak/actions?query=workflow%3A%22Build+pak+binary%22

gaborcsardi commented 3 years ago

Well, it was about circular dependencies, after all, because circular dependencies triggered it. :)

schloerke commented 3 years ago

Confirmed it works on my end. Thank you!