Make provideStatementRange() create a single chunk virtual doc#914
Open
DavisVaughan wants to merge 2 commits intoquarto-dev:mainfrom
Open
Make provideStatementRange() create a single chunk virtual doc#914DavisVaughan wants to merge 2 commits intoquarto-dev:mainfrom
provideStatementRange() create a single chunk virtual doc#914DavisVaughan wants to merge 2 commits intoquarto-dev:mainfrom
Conversation
Collaborator
|
Addresses posit-dev/positron#3233 partially |
juliasilge
reviewed
Feb 11, 2026
Collaborator
juliasilge
left a comment
There was a problem hiding this comment.
This is working great for me! I reviewed with the current Positron daily so I don't have posit-dev/ark#1030 in it, but the behavior is as expected and looks good.
Before we merge this, can you:
- add a new
vdoc.test.tsto the extension tests here with some basic tests of the virtual documents we make with the new options? One option is to make a utility similar toroundtripSnapshotTest()but for virtual docs (one way only,.qmd➡️.Ror.py) and another option would be to inline the structure of the vdoc in the test file. Take a look at what we have inapps/vscode/src/test/examplesand the tests inquartoDoc.test.tsfor example on snapshots. Be aware you will not have access to any language pack extension in the tests, only the Quarto extension itself, but I think that will be fine in this case. - update the copyright year to say "Copyright (C) 2022-2026 by Posit Software, PBC" on the files you edited?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of the statement range refinement plan
Surgical tweak to
provideStatementRange()andvirtualDoc()to only make the virtual doc for that chunk, so parse errors in one chunk can't render other chunks useless from a statement range perspectiveYou also need posit-dev/ark#1030 if you want to test that you can execute code above a parse error within the same chunk, but that isn't critical to the ability to execute code in an arbitrary chunk if one of them has a parse error.
Before, if you make a typo in one chunk:
quarto-before.mov
After, if you make a typo in one chunk:
quarto-after.mov