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

Update webR to run R 4.4: can't install packages from a custom wasm CRAN built with R 4.4 #131

Open
DivadNojnarg opened this issue May 7, 2024 · 1 comment

Comments

@DivadNojnarg
Copy link

I am maintaining a wasm CRAN-like which was build from GA with R4.3 few weeks ago using the r-wasm/actions flow from @georgestagg: https://github.com/RinteRface/rinterface-wasm-cran.

I updated it and since R4.4 was released recently, my WASM repo is now built with R4.4. shinylive depends on an older webr version (webR only supports R4.4.0 since recently r-wasm/webr@28077f5). Therefore, shinylive still runs R4.3 (there are references to R4.3 such as in webr::install):

webr::install
function (packages, repos = NULL, info = NULL, lib = NULL, quiet = FALSE, 
    mount = TRUE) 
{
    ...
    contrib <- gsub("repo.r-wasm.org/bin/emscripten/contrib/4.3", 
        "repo.r-wasm.org/bin/emscripten/contrib/4.3.3", contrib, 
        fixed = TRUE)
...
}
getRversion()
[1] ‘4.3.3

which prevents from retrieving and installing the package from my CRAN like.

Here is the shinylive link to reproduce.

@georgestagg
Copy link
Collaborator

georgestagg commented May 7, 2024

Hi,

Thank for for reporting this! Indeed, your analysis looks correct. The r-wasm/actions scripts currently track the latest build of webR, rather than some fixed version, and Shinylive is currently fixed to use version v0.3.1 of webR.

Eventually, a version of webR will be released running R 4.4.0, we'll update Shinylive to match, and this will go away. However, I can see this will be an issue up until that point, and also going forward for users with older Shinylive deployments already in place.

So, I have opened a PR in r-wasm/actions with a potential solution at r-wasm/actions#20. With that change, the user will be able to choose which webR development image to use. By choosing to build packages with the webR v0.3.1 image explicitly, R packages will be built under .../bin/emscripten/contrib/4.3/, compatible with that version of webR.

Once that PR has been cleaned up and merged, you should be able to make use of the new workflow input in your GitHub Actions file to solve this Issue. I will come back here and document the process in more detail at that point.

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