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

Add allowIncomplete to runtime.executeCode() #664

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

juliasilge
Copy link
Collaborator

Addresses posit-dev/positron#4459

Before this change, if you had some invalid code in a code chunk (R or Python) such as this:

```{r}
rnorm(1000, 1. 2)
```

then using "Run Cell" (either via the button or keybinding) in Positron would result in the console just looking like nothing is happening. What is happening under the hood is that Positron can tell the statement isn't "complete" and it's waiting for the user to finish it. That isn't an appropriate thing for the console to do in many situations, so we have the option allowIncomplete:

Whether to bypass runtime code completeness checks. If true, the code will be executed by the runtime even if it is incomplete or invalid. Defaults to false.

This PR changes the Positron Quarto executors to use true, i.e. to skip the code completeness checks and just execute the code, even if it is about to error.

Copy link
Collaborator

@isabelizimm isabelizimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! tried out the vsix and acts as expected in source and visual mode 🚀

@juliasilge juliasilge merged commit 1375251 into main Feb 18, 2025
1 check passed
@juliasilge juliasilge deleted the allow-incomplete-execute-code branch February 18, 2025 22:56
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

Successfully merging this pull request may close these issues.

2 participants