Skip to content

Conversation

jkrumbiegel
Copy link
Contributor

This PR sends the location info for the source files of the target.markdown field over to the julia engine so it can send the correct stack traces back. This is the quarto-side part of the fix for #13400 for the julia engine.

Checklist

I have (if applicable):

  • filed a contributor agreement.
  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Sep 22, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@cscheid
Copy link
Collaborator

cscheid commented Sep 22, 2025

I think this looks good to merge once tests pass; thanks, @jkrumbiegel!

I will say that we are planning a large move towards allowing extensions to contribute engines, and we will probably need to work on a more comprehensive solution to encode our MappedString structures across process boundaries. SourceLocation is a simple encoding of that, but we probably want something richer.

(We'll be in touch when we're ready to have you folks work on it, I just wanted to give you a heads up.)

@jkrumbiegel
Copy link
Contributor Author

The new test is passing with my dev branch PumasAI/QuartoNotebookRunner.jl#339 so once that is merged and tagged I can update the PR with the new QNR version here and then it should be good to go.

@cscheid
Copy link
Collaborator

cscheid commented Sep 24, 2025

cc @gordonwoodhull, just so you're aware of how JuliaEngine is currently communicating source lines to a subprocess.

@cscheid cscheid marked this pull request as ready for review September 24, 2025 12:31
@cscheid cscheid self-requested a review September 24, 2025 12:31
@@ -0,0 +1,3 @@
```{julia}
"$(@__FILE__):$(@__LINE__)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's really great that you can do this in the julia engine!

Copy link
Collaborator

@cscheid cscheid left a comment

Choose a reason for hiding this comment

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

Looks great.

@cscheid cscheid merged commit 369a58e into quarto-dev:main Sep 24, 2025
51 checks passed
# QuartoNotebookRunner = "=0.17.3"

[sources]
QuartoNotebookRunner = {url = "https://github.com/PumasAI/QuartoNotebookRunner.jl", rev = "jk/source-ranges"}
Copy link
Contributor

Choose a reason for hiding this comment

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

@cscheid this shouldn't have gone in until I have time to review that PR, otherwise quarto master is using a reference to a branch that will change/get deleted soon.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, I'm sorry. We do try to keep main working (and I will no longer merge these before your ok!).

With that said, we can tolerate some minor amount of breakage here. Can you let me know when the new release is up so we can just bump QNR to (I assume) 0.17.4?

Copy link
Contributor

Choose a reason for hiding this comment

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

Might get to it this week, might not though, so it's probably best to just revert for the time being.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it. But just to understand: in the meantime, the branch exists and presumably works (since the tests passed?)

Copy link
Contributor

Choose a reason for hiding this comment

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

But just to understand: in the meantime, the branch exists and presumably works (since the tests passed?)

Correct, it'll keep working until we go and merge and delete the branch then stuff here will begin failing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In that case, I think I'm comfortable with this living on main for the time being. We're very early on in 1.9; this looks safe to me!

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.

4 participants