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

Run all does not guarantee in-order execution #133

Open
agoose77 opened this issue Mar 25, 2023 · 1 comment
Open

Run all does not guarantee in-order execution #133

agoose77 opened this issue Mar 25, 2023 · 1 comment
Assignees

Comments

@agoose77
Copy link
Collaborator

I noticed this today, and will take a look in due course.

This line ensures that a cell may not immediately execute if we're waiting for it to render. This would allow out-of-order execution. It's unfortunate that the current JupyterLab interface doesn't let us block during this time (e.g. if we could return a promise).

https://github.com/executablebooks/jupyterlab-myst/blob/6a9409e290a097166a4917cb67939e0ce91be1cd/src/actions.ts#L133

I think the solution will be to parse the MDAST separately to the render pass, i.e. keep a cached MDAST that invalidates if the model is changed. This would allow us to avoid waiting for the render event.

@agoose77
Copy link
Collaborator Author

Another thing to consider here is defining a custom executor that properly allows us to block during markdown-cell execution.

@agoose77 agoose77 self-assigned this Jul 31, 2024
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

1 participant