-
Notifications
You must be signed in to change notification settings - Fork 348
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
Errors with multiline strings are printed incorrectly #12270
Comments
@jkrumbiegel Could you add an example of code producing this? |
You can't trigger it from the outside unless there's a multiline error message in quarto. I only recently added one in #11803 which is when I noticed this. I don't know if quarto has another one. If you wanted to reproduce it, you could edit any location in quarto you find suitable to throw with a multiline error message, and then trigger that condition. |
Ok I actually made a reproducible example for you for simplicity. I just searched for errors thrown with input interpolated into the error string and voila:
|
Thank you for finding that. This will definitely help |
It happens here Lines 343 to 350 in 2ae62ed
We split on newlines, and only remove the first line. So We don't handle multiline error. This leads to the duplicate. This is
Could we look maybe for the first line with |
Bug description
I noticed that error messages I throw from the julia engine code sometimes contain repeated sections, this seems to happen when the error message is a multiline string. For some reason lines 2:end are spliced into the stack trace. It looks like this, notice the repeated lines after
Stack trace:
:I guess it's this code that does the splicing https://github.com/PumasAI/quarto-cli/blob/d109025e0bd34c0dfeb23780669c361e7c561016/src/core/log.ts#L347-L349 but I'm not sure why part of the message is considered the
stack
in the first place.Steps to reproduce
No response
Actual behavior
No response
Expected behavior
No response
Your environment
No response
Quarto check output
The text was updated successfully, but these errors were encountered: