golem
golem copied to clipboard
object is not exported by namespace
Steps to reproduce
- Create a golem
- Add an
@importFrom golem totoin a function - Run
run_dev.R
The error is normal because I failed in the importFrom
- Then remove the fake function
- Run
run_dev.R
This still fails.
Using roxygen2::roxygenise() should work. It work if you do it directly in the console.
Maybe here: https://github.com/ThinkR-open/golem/blob/99c698dba6d601268db6a9ab6c2fd3a4f5d731ff/R/reload.R#L42
use:
roxygenise(package.dir = pkg, roclets = NULL)
I do not remember why I had to put this option in {attachment}, but this works now.

Hey,
rocklet = NULL is the default value for roxygenize(), so I don't think this should change anything.
The issue comes from the fact that even if you remove the @importFrom, roxygenize() returns a warning, which throws the error in document_and_reload()
not sure how to handle this so far
Ok so the way to do this is to not stop in case of warning. That should be doable by tweaking the tryCatch