extendr / rextendr

An R package that helps scaffolding extendr-enabled packages or compiling Rust code dynamically
https://extendr.github.io/rextendr/
Other
190 stars 28 forks source link

Allow `rextendr::document()` to compile only #276

Closed daniellga closed 1 year ago

daniellga commented 1 year ago

I am not using roxygen on my project but rextendr keeps changing my NAMESPACE and DESCRIPTION file. Is it possible to add an argument to allow only the compiling/recompiling functionalities to be used? Something like rextendr::document(compile_only = TRUE) or rextendr::document(roxygenize = FALSE). Or even create a new function (rextendr::compile(), maybe?) with only the compiling part of rextendr::document().

Ilia-Kosenkov commented 1 year ago

We rely on devtools::document(). Do you know if you can achieve what you need by modifying roclets argument? If yes, it is an easy task, because we already forward roclets from rextendr::document() to devtools::document().

JosiahParry commented 1 year ago

If you are inside of RStudio you can run CMD shift B to trigger a build and then CMD shift l to load all. That is the approach I take. Or you can even skip the build because devtools will recompile for you. Would that fit the bill?

daniellga commented 1 year ago

We rely on devtools::document(). Do you know if you can achieve what you need by modifying roclets argument? If yes, it is an easy task, because we already forward roclets from rextendr::document() to devtools::document().

I already tried messing with this roclet thing to no avail. What would I put there to avoid having this behaviour?

image

image

JosiahParry commented 1 year ago

Why do you need to use document? Can you use register_extender() instead?

daniellga commented 1 year ago

oh I didn't know about this function. Thanks!