posit-dev / r-shinylive

https://posit-dev.github.io/r-shinylive/
Other
152 stars 16 forks source link

export doesn't download binary WebAssembly packages as part of the output app's static assets. #110

Closed maek-ies closed 1 month ago

maek-ies commented 1 month ago

Great to see that the latest version allows bundling of packages, ensuring reproducibility!

After trying test it and running shinylive::export('myapp','public') command, the following warning appears for me and no wasm packages are downloaded into ./shinylive/webr/packages folder.

✔ Copying base Shinylive files [1.2s] Finding R package dependencies ... Done! [===>------------------------------------------------------------------] 6%s Warning: unable to access index for repository http://repo.r-wasm.org/bin/emscripten/contrib/4.4.1: cannot open URL 'http://repo.r-wasm.org/bin/emscripten/contrib/4.4.1/PACKAGES'

georgestagg commented 1 month ago

Hi @maek-ies, thank you for reporting this!

The following TODO now needs to be enacted. Apologies that we missed this during release.

https://github.com/posit-dev/r-shinylive/blob/e44f6ab21e782fd1ad5749ac74e5fbf5a74d368e/R/packages.R#L17-L19

For the moment, I will add a redirect in the webR public repo to handle the problem, but we should indeed fix this for v0.2.1 and beyond.

maek-ies commented 1 month ago

Thanks for the quick response, clarification and great work, George!

georgestagg commented 1 month ago

I've now put the redirect in place.

URLs of the form https://repo.r-wasm.org/bin/emscripten/contrib/4.4.1/... should now be redirected to https://repo.r-wasm.org/bin/emscripten/contrib/4.4/... and so wasm binaries should be able to be downloaded by Shinylive.

@maek-ies This should now hopefully work for you, but even if so please don't close this issue quite yet as it is something we'll need to fix for the future.

maek-ies commented 1 month ago

@georgestagg it works now, thank you for the quick fix!