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

[Bug]: The dev version of the catalog does not use the dev version of packages #267

Open
3 tasks done
vedhav opened this issue Sep 23, 2024 · 2 comments
Open
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@vedhav
Copy link
Contributor

vedhav commented Sep 23, 2024

What happened?

Checking the sessionInfo for the shinylive app in the catalog shows that the packages are installed from https://repo.r-wasm.org and not https://pharmaverse.r-universe.dev even after setting the webr_pkg_repos option for the repos.
I still do not know why this happens. There are two interesting observations though:

  1. Once a package is installed the shinylive does not reinstall them, this can be tested in a fresh shinylive editor or webr repl instance when these lines are executed it can be observed that the package teal is not updated when installed for the next time.
install.packages('teal')
packageVersion('teal')
# [1] ‘0.15.2’
install.packages('teal', repos=c("r-universe" = "https://pharmaverse.r-universe.dev", getOption("webr_pkg_repos")))
packageVersion('teal')
# [1] ‘0.15.2’
install.packages('teal', repos=c("r-universe" = "https://pharmaverse.r-universe.dev", getOption("webr_pkg_repos")))
packageVersion('teal')
# [1] ‘0.15.2.9063’
install.packages('teal')
packageVersion('teal')
# [1] ‘0.15.2.9063’
  1. Perhaps, the webR binary repo (https://repo.r-wasm.org) is given precedence, causing this unexpected behavior, and the package is also installed during a library call if it is not installed. It could be that this call does not account for the webr_pkg_repos option and just uses the https://repo.r-wasm.org
Screenshot 2024-09-23 at 7 31 11 AM

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@vedhav vedhav added the bug Something isn't working label Sep 23, 2024
@pawelru
Copy link
Contributor

pawelru commented Sep 23, 2024

Thanks! I will have a look at this

@pawelru
Copy link
Contributor

pawelru commented Sep 23, 2024

This applies only for shinylive - the other coatless/webr extension used for static output works as intended.
I believe that this is being determined during rendering the book which tries to build the cache of binaries. Looking at the results - we have [email protected] (i.e. the latest release) for both stable and devel.
Now looking into the functionality itself (namely: this function), it looks like it's reading the DESCRIPTION of already installed packages (!) and based on that decides which repo to pull the webr binaries from. In order to use r-universe webr binaries we would have to install R packages from there. Currently this is done by staged.deps which is cloning the repos and install from local. We would have introduce some big changes in the way how we install dependent packages. Luckily, this is in progress and it's tracked here. I hope it won't be difficult to configure r-universe into this.
Alternative is to disable creating cache during the render and force installing all during the runtime. This is a new feature, currently available in the development version only.
I think I am leaning towards the latter because of simplicity. I would have to check the performance though. Therefore I think I will keep this open until that feature becomes available. For the time being - unfortunately we would have to live with this.

@pawelru pawelru assigned pawelru and unassigned donyunardi, pawelru and cicdguy Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants