golem icon indicating copy to clipboard operation
golem copied to clipboard

object is not exported by namespace

Open statnmap opened this issue 5 years ago • 2 comments

Steps to reproduce

  • Create a golem
  • Add an @importFrom golem toto in 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.

image

statnmap avatar Jun 09 '20 09:06 statnmap

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()

Screenshot 2020-07-16 at 21 29 51 Screenshot 2020-07-16 at 21 30 08

not sure how to handle this so far

ColinFay avatar Jul 16 '20 19:07 ColinFay

Ok so the way to do this is to not stop in case of warning. That should be doable by tweaking the tryCatch

ColinFay avatar Oct 01 '20 19:10 ColinFay