Description
Check out the following video. If you "run all above" and then very quickly run another code block, then the blocks have the potential to be run out of order.
broken.mov
This is due to the way this execute()
hook works for Positron
quarto/apps/vscode/src/host/hooks.ts
Lines 58 to 67 in 06678d5
Note that the await
happens within the loop at each iteration. That means that after the first await
, we can switch away to some other code - in particular someone else could call execute()
and we could execute their code before we finish executing all of the blocks that we need to run.
@lionel- and I have a patch that only performs the await
on the last code block. That ensures that we can sequentially fire off all of the block
s without the potential of having someone else execute code in between two of our blocks. I'll send in a PR for this.
---
title: "Untitled"
format: html
---
```{r}
library(tidyverse)
library(phyloseq)
library(decontam)
```
```{r}
x <- 1
```
```{r}
y <- x
```
```{r}
z <- y
```
```{r}
a <- z
```
```{r}
```