[ANN] RelevanceStacktrace.jl: For fastest error locating

Hey Julianners!

Errors are part of our life, but locating them isn’t!

The package locate the files that are yours and highlights them. Also, it will BOLD the first file you are actually looking for 99% of the time. So you don’t have to go through the stacktrace ANYMORE.

Cvikli/RelevanceStacktrace.jl (github.com)

Visual example:

using Pkg; Pkg.add(url="https://github.com/Cvikli/RelevanceStacktrace.jl.git")
using RelevanceStacktrace
func4(x) = begin
	x+=x
	x=sum(x) .* [5, 3]
	x=sum(x[3])
	return x/3
end
func3(x) = x+5 + func4(x)
func2(x) = x+3 + func3(x)
func1(x) = begin
	func2(x)
end
func1(3)

artificial error example
In real life development, it is even more powerful.

I am using it for more than one and a half years and seriously this is SO GREAT, everyone has to know about it. So I wanted to share it with the community!

Some fun fact, the package tries to change the mentality over the errors, so finding an error is a good thing and shows it in GREEN! :wink:

32 Likes

Great package Is there an issue to have something like this in Base?

1 Like

Hi,
I guess the tradeoff is to have some method invalidations, but when I checked it doesn’t really do a big invalidation. So I didn’t experience any issue with it in the last years. :slight_smile:
Also it is compiled into my sysimage… so if I am right that could also reduce it to 0? Probably. :smiley:

I have a script that just prepare a great sys image, so everything is much faster. But with 1.8… I think it is already can be dropped basically as everything loads extremly fast…

1 Like

Is there a reason you did not register the package?

3 Likes

Looks great! Can it be merged into GitHub - BioTurboNick/AbbreviatedStackTraces.jl? Presumably it shares some of the logic.

5 Likes

I didn’t know it is open for publishing. Thank you for pointing out.

@ufechner7 pointed it out too and he help me to get it there. :slight_smile:

@antonie-levitt for me I like the “ordered” error messages and had some bad experiences with dinamic “UI” in the past during my work at my company, so I think I won’t make that for a while. Maybe later on, or someone if preferred can do it.
By the way I didn’t check the AbbreviatedStackTraces, but it should be easy to merge for sure!

1 Like

And it is there!
] add RelevanceStacktrace
Juhhu! :partying_face: :partying_face: :partying_face:

Thank you all!
(Also looking forward to julia 2.0 when it hets merged into the official julia branch XD :smiley: :crossed_fingers:)

7 Likes

Thanks a lot for the package, it looks very useful and simple :tada:

Is there a PR for this in Julia’s base?

1 Like

Thank you! I hope it helps the community a lot! There will be a lot more package that will be crazy helpful, you will see, I already have those too, as it mature enough I will publish them too! :smiley: Julia is just mindblowing!

On the other hand, I think it is nice to have this as an importable module for now. But of course it would be really innovative to have anything like this standardised in a language, maybe even too innovative, that is why I just joked with the 2.0 (also I know there is no plan for 2.0 atm) :smiley: