Videos from JuliaCon are now available online
2018
Previous editions: 2017 | 2016 | 2015 | 2014
Tim Holy



Making the test-debug cycle more efficient

Julia’s interactivity and just-in-time (JIT) compilation are major assets for developers; however, as codebases grow larger, compilation time becomes a burden on the write-test-debug cycle. While the ultimate answer might be faster JIT-compilation, an alternative is to compile less often: specifically, to do more useful development per unit of compilation. This necessitates the ability to fix bugs—and test these fixes—interactively without restarting Julia. Until relatively recently, this was difficult especially for highly-modular projects involving many packages, where the right fix might lie at a deep layer in the package hierarchy. Fortunately, recent work in base Julia laid the groundwork for a more efficient approach in which functions can be arbitrarily redefined and their dependencies recompiled; however, to use this capability one had to re-evaluate these functions manually. I will describe a package, Revise.jl, that automates much of the work of the test-debug cycle. Revise scans “active” source files for changes and automatically updates function definitions in a running Julia session. In this talk I will describe the main things Revise can and can’t do, explain some of the strategies that Revise uses to limit the amount of code that needs re-evaluation, and emphasize some of its new capabilities present only in Julia 0.7/1.0.

Speaker's bio