You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 blocks 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}
```
The text was updated successfully, but these errors were encountered:
I can confirm that this is an issue for more than just Positron. Here is a video of the Quarto extension in VS Code with VSCode-R, same problem. So that suggests we should use the new TaskQueueManager anywhere we need to execute code for a particular language (We should probably give VSCode-R and Positron's native R different keys in the TaskQueueManager if we do this).
See posit-dev/positron#4231
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 Positronquarto/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 firstawait
, we can switch away to some other code - in particular someone else could callexecute()
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 theblock
s without the potential of having someone else execute code in between two of our blocks. I'll send in a PR for this.The text was updated successfully, but these errors were encountered: