Annotate execute request source code with code location #981
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.
Progress towards posit-dev/positron#1766
Ark side of posit-dev/positron#10815
Branched on #974
This adds a
#linedirective to parsed code to map srcrefs to the file and line origin.The code is also mapped to the correct starting column by padding the code with leading whitespace.
With these changes, srcrefs point to the editor from which the code was executed:
Screen.Recording.2025-12-05.at.17.18.53.mov
The
#linedirective and padding whitespace are added via Rowan (#974). They could also just be prepended to the code textually, but we'll have to use Rowan for breakpoint injection so I thought we'd get our feet wet with it.