Skip to content
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

calling knit_exit() puts knits in a non-functioning state #2372

Open
3 tasks done
dlampart opened this issue Oct 11, 2024 · 0 comments
Open
3 tasks done

calling knit_exit() puts knits in a non-functioning state #2372

dlampart opened this issue Oct 11, 2024 · 0 comments
Assignees

Comments

@dlampart
Copy link

Hi,

We think we discovered the following bug. Let's say we have two reports:

knit_exit.Rmd

---
output: md_document
---

```{r}
knitr::knit_exit()
```

hello.Rmd

---
output: md_document
---

```{r}
print("hello")
```

Now running the following code:

knitr::knit("knit_exit.Rmd")
knitr::knit("hello.Rmd")

will generate an empy hello.md file.

If statements are reversed or there's the unload statement in between:

unloadNamespace("knitr")

the hello.md statement is rendered as expected.

sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: aarch64-apple-darwin23.2.0 (64-bit)
Running under: macOS Sonoma 14.6.1

Matrix products: default
BLAS:   /opt/homebrew/Cellar/openblas/0.3.26/lib/libopenblasp-r0.3.26.dylib 
LAPACK: /opt/homebrew/Cellar/r/4.3.3/lib/R/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Zurich
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] knitr_1.48

loaded via a namespace (and not attached):
[1] compiler_4.3.3 tools_4.3.3    xfun_0.47     

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('knitr'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/knitr').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants