# Recursive code\_warntype?

**URL:** <https://discourse.julialang.org/t/recursive-code-warntype/8513>\
**Category:** General Usage\
**Created:** [January 22, 2018, 12:50am UTC](https://discourse.julialang.org/t/recursive-code-warntype/8513 "2018-01-22T00:50:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [January 22, 2018, 12:50am UTC](https://discourse.julialang.org/t/recursive-code-warntype/8513/1 "2018-01-22T00:50:55Z")

</div>

Is there any way to check type instabilities on all functions called by the main function recursively only displaying as far as the last instability (i.e. only package functions not Julia Base functions) or up to a certain depth in the function call tree? If not, is it possible? If it’s possible, I would like to vote up for it to be done as soon as possible right after v1.0. This would make my debugging experience so much more time efficient.

---

<div class="post-metadata">

**Author:** ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)\
**Post date:** [January 22, 2018, 1:00am UTC](https://discourse.julialang.org/t/recursive-code-warntype/8513/2 "2018-01-22T01:00:18Z")

</div>

If you step through your code with ASTInterpreter2, you can type code\_typed before any call to get the type inferred view of that function. It’s not quite what you asked for, but it can be used for that purpose.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [January 22, 2018, 1:02am UTC](https://discourse.julialang.org/t/recursive-code-warntype/8513/3 "2018-01-22T01:02:58Z")

</div>

Great, I haven’t really been using ASTInterpreter2, so I will check it out, thanks!

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [January 22, 2018, 2:09am UTC](https://discourse.julialang.org/t/recursive-code-warntype/8513/4 "2018-01-22T02:09:06Z")

</div>

[Using TraceCalls.jl](http://nbviewer.jupyter.org/github/cstjean/TraceCalls.jl/blob/master/README.ipynb#Type-stability)

```julia
using TraceCalls
tr = @trace YourModule code_to_trace()
redgreen(map(is_inferred, tr))
# Also consider: 
filter_lineage(!is_inferred, tr, keep_descendents=false)

```

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [January 22, 2018, 9:58am UTC](https://discourse.julialang.org/t/recursive-code-warntype/8513/5 "2018-01-22T09:58:22Z")

</div>

Looking promising, thanks for that, will try it out too.
