r-wasm / rwasm

Build R packages for WebAssembly and create a CRAN-like repo for distribution.
https://r-wasm.github.io/rwasm/
Other
54 stars 4 forks source link

[Doc] how to force rebuild an R package from source #29

Open JosiahParry opened 5 months ago

JosiahParry commented 5 months ago

I want to watch the build process for my R package again to make sure that an environment variable is successfully being passed in. However, I cannot understand the pkgdepends::pkg_refs() documentation linked.

How would one go about forcing the recompliation of a package. From my reading of the dock the below should work.

rwasm::add_pkg("https://github.com/josiahparry/rsgeo?source&nocache")

JosiahParry commented 5 months ago

I've tried rm_pkg() but it gave me this message which made me panic and cancel the function while in process. I just spent nearly an hour and a half installing the dependencies for vctrs and would hate to see all of them be delete because I wanted to remove a single package.

image
georgestagg commented 5 months ago

rm_pkg() is probably the easiest method right now. I'd like to support pkg_refs like nocache here but rwasm has its own caching mechanism that's unaware of those pkg ref attributes currently.

I've marked this as a bug to remind me to revisit the caching mechanism.

Don't worry about the "Processing packages" output, it's not removing those packages. The output is from rebuilding your repository PACKAGES file after removing packages with rm_pkg(). Those files listed are built and existing ones that have been found.