New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local_tempfile() fails to close the connection when used in examples with lines= #256
Comments
See the NEWS file, you need to actively set the I would just use |
I would rather not clutter up package examples with extra nesting/option setting... let me take a look tomorrow at how else to support this use case. We're not failing on CRAN so presumably it's an issue with the CI script. FWIW I would call out this use case (local_tempfile() inside package examples) in the NEWS, I read that bullet but didn't make the connection because the source() usage is several layers deep. |
CRAN is sourcing in the globalenv, which explains why By the way @gaborcsardi let me know that this only works because your example is conditional. If you remove the condition, the generated R code will no longer be fenced by |
Got it, thanks for the elaboration. In that case I will just stick with un-hooked file cleanup, using I see two other CRAN packages that may be affected: |
As seen in {lintr}:
r-lib/lintr#2519
Here's the smallest example I could make, doesn't feel very minimal. I tried stripping out various parts of the Rd to no avail. I still don't understand what's going wrong.
The text was updated successfully, but these errors were encountered: