r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.37k stars 755 forks source link

devtools::load_all( ..., recompile=F) often still recompiles, and breaks existing library. #2513

Closed cdriveraus closed 8 months ago

cdriveraus commented 1 year ago

When I am working on the ctsem package (https://github.com/cdriveraus/ctsem ), even though I set recompile to FALSE, (which I realise shouldn't make a difference as it is the default), I get:

Re-compiling ctsem (debug build)

What are the reasons for this to happen, can I avoid it? Under this 'debug build' the package fails to compile, then I have to restart and reinstall the package using the regular 'full' build procedure -- the load_all broke my existing library in some way.

There are some complexities to the package because it uses rstantools to write c++ during package install -- but there is no need to recompile, and using the regular rstudio build process it only recompiles when the c++ is actually changed between installs.

jennybc commented 1 year ago

I'm not working on devtools right now. But one thing it would be helpful to share here is a link to the package, if it's on GitHub or similar.

jennybc commented 8 months ago

This thread seems to have gone stale.

In case it helps, devtools::load_all() is an extremely thin wrapper around pkgload::load_all(), so if you care to resume this, I recommend opening an issue in the pkgload repo.

cdriveraus commented 8 months ago

some relevant discussion here in case anyone stumbles this way: https://github.com/r-lib/pkgbuild/issues/154#issuecomment-1707778109