Execution order on Run Document
Closed this issue · 0 comments
I have noticed some instances when using remote sessions where, when pressing "Run Document", code chunks do not seem to get executed in the right order (e.g a library that is supposed to be loaded in one cell is reported as not available in later cells). Given our current execution model (i.e. one that does not use a dependency graph) we need to make sure that CodeChunk
s and CodeExpression
s are executed in the order they appear in the document (as assumed in Jupyter and R Markdown).
Note in the below, the execution of the code chunks is triggered at the same time and it is just lucky that they get executed in the right order (most of the time).
The offending lines appear to be here:
Instead, I think it needs to be something like:
for (const node in this.codeNodeSelector()) {
await node.execute()
}