Skip to content

Conversation

@adrhill
Copy link
Contributor

@adrhill adrhill commented Jun 6, 2024

As pointed out in #52334, stack traces of StackOverflowErrors currently don't highlight recursions enough. Spotting the light black (repeats $n times) note in a colorful stack trace is difficult.

This PR highlights this note in bold yellow color.

Examples

Before the PR, the recursion in [4] lu is hard to spot:

Screenshot 2024-06-06 at 15 36 31

After this PR, it is emphasized in bold and yellow color:

Screenshot 2024-06-06 at 15 53 08

@kimikage
Copy link
Contributor

kimikage commented Jun 9, 2024

xref: #54712

(I don't see a problem with multiple PRs for the same issue, but I do see a problem with no follow-up for a few days.)

@adrhill
Copy link
Contributor Author

adrhill commented Jun 9, 2024

Might be worth cross-referencing my original post in the #gripes Slack channel.
I looked through open issues like #52334 but didn't expect @xlxs4 to have opened PR #54712 in the meantime.

@kimikage
Copy link
Contributor

In fact, these two PRs are different. In short, the colors are different.

I am not interested in bike-shedding. I am just wondering if Base.warn_color() or Base.error_color() could be used instead of hardcoding colors.
(This is in Base and the functions might not be available depending on the order of loading.)

@LilithHafner LilithHafner merged commit 4a65772 into JuliaLang:master Jun 21, 2024
@LilithHafner
Copy link
Member

This does not fix #52334, but is an improvement (except that sometimes the number this PR highlights is wrong, but that's a separate bug). I picked this one over #54712 to avoid hardcoding colors.

@adrhill adrhill deleted the ah/hl-repeat-error branch June 21, 2024 15:23
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.

3 participants