Hello,
This is kind of a weirdly circular scenario, and maybe the answer is just "sorry, you can't do that" but I wanted to see what folks thought.
I am using renv
in a package that I'm developing, in order to isolate the environment and make sure all the developers are working with the same versions of the dependencies. Overall, it's working great. Yee haw.
But I just stumbled onto this weird issue: when I try to run the vignettes interactively, they die on the first chunk where I load my library (with library(rbabylon)
, which is my package). It just errors with Error in library(rbabylon) : there is no package called ‘rbabylon’
because, of course, there is no rbabylon
installed in renv/library/...
.
Now, in real life, I know what the problem is and I can just run devtools::load_all()
or whatever and skip this chunk and run the rest of the vignette interactively. But then I feel like I want to put a big comment in an include=F
block above it that tells other developers about this issue so that they don't get weird when they see that message... and then that feels hacky... and so I'm just wondering if anyone else has run into this and if there is a recommended fix.
Sidenote: I ran into a similar thing with some scripts I have in data-raw
that generate my test data, although for those I just replaced library(rbabylon)
with devtools::load_all()
. It still felt a little hacky, but it worked fine. For some reason doing it in the vignettes feels like a step too far though.
Any thoughts and ideas are much appreciated!