Julia, detecting errors at compile time

Setting aside Julia’s JIT runtime (even Java has a JIT, but javac, which does *.java → jvm bytecode catches lots of errors):

What is the most advanced tool for catching “no method/impl found for dispatch” errors “ahead of time” ?

I.e. I want to feed it a bunch of *.jl files, and catch as many as possible 'no method/impl found for dispatch" errors as possible without actually running the code.

Thanks!

Try JET.jl

2 Likes

duplicate of this thread? Compile time: we can't find any impls for this multi dispatch fn? - #21 by jling

1 Like

I’d prefer to keep these two separate. The other thread goes all over the place, and I’d like this one to just focus purely on detecting more errors at compile time.

I don’t think there’s a lot more to say. You’ve gotten the suggestion to use JET a couple of times, but you’ve never engaged with it, which makes it seem like you’re ignoring the advice you’ve been asking for.

What you’re asking for may not be possible in quite the way that you envision it: in code like add_first_last(list) = first(list) + last(list) there are an infinite number of types that could be supplied for list, and whether all the requisite methods are defined is type-dependent. So I have trouble envisioning anything that behaves radically differently from JET. So the answer is: just use JET.

3 Likes

This is false and unnecessarily antagonizing.

I’m glad to hear it’s false. Let us know how your experiments with JET work out!

6 Likes