# Julia development workflow

**URL:** https://discourse.julialang.org/t/julia-development-workflow/7091
**Category:** New to Julia
**Tags:** package
**Created:** [November 15, 2017, 10:18pm UTC](https://discourse.julialang.org/t/julia-development-workflow/7091 "2017-11-15T22:18:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mopg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mopg/32/3368_2.png) [@mopg](https://discourse.julialang.org/u/mopg)
#### Post date: [November 15, 2017, 10:18pm UTC](https://discourse.julialang.org/t/julia-development-workflow/7091/1 "2017-11-15T22:18:08Z")

</div>

I am writing a package in Julia from scratch, and am trying to figure out what the optimal workflow is. (Apologies if this is described somewhere in the documentation)

Note that it is still very much in development, so I do not want to publish it yet using `PkgDev`.

Right now, every time I change something in the source code, I run

```julia
workspace(); include("src/mypackage.jl")

```

which precompiles the whole thing again. If I don’t include `workspace()` and just include the package again, sometimes the package does not actually update.

This also requires the package to be pre-compiled every time I restart julia.

Is this the most efficient way to develop a package? Or are there better methods which only recompile the functions that changed (and anything that depends on those)?

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [November 15, 2017, 10:23pm UTC](https://discourse.julialang.org/t/julia-development-workflow/7091/2 "2017-11-15T22:23:18Z")

</div>

Check this:

> [@\[ANN\] Higher productivity (fewer Julia restarts) with Revise.jl](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564):
>
> I’m announcing a new package that may speed up your development: [https://github.com/timholy/Revise.jl](https://github.com/timholy/Revise.jl). Revise makes it easier to update code and have the changes take effect immediately, without having to restart Julia. Please see the README for more information.

---

<div class="post-metadata">

### Author: ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)
#### Post date: [November 16, 2017, 6:34am UTC](https://discourse.julialang.org/t/julia-development-workflow/7091/3 "2017-11-16T06:34:45Z")

</div>

[https://tpapp.github.io/post/julia-workflow/](https://tpapp.github.io/post/julia-workflow/)

---

<div class="post-metadata">

### Author: ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)
#### Post date: [November 16, 2017, 6:52am UTC](https://discourse.julialang.org/t/julia-development-workflow/7091/4 "2017-11-16T06:52:33Z")

</div>

and [atom-julia-client/workflow.md at master · JunoLab/atom-julia-client · GitHub](https://github.com/JunoLab/atom-julia-client/blob/master/manual/workflow.md)

---

<div class="post-metadata">

### Author: ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)
#### Post date: [November 16, 2017, 9:35am UTC](https://discourse.julialang.org/t/julia-development-workflow/7091/5 "2017-11-16T09:35:58Z")

</div>

Also, the latest Julia VSCode extension has a “Reload imported modules” option which I’m guessing should do what you want (probably using Revise under the hood).

---

<div class="post-metadata">

### Author: ![mopg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mopg/32/3368_2.png) [@mopg](https://discourse.julialang.org/u/mopg)
#### Post date: [November 16, 2017, 2:46pm UTC](https://discourse.julialang.org/t/julia-development-workflow/7091/6 "2017-11-16T14:46:58Z")

</div>

All great replies, thanks!

And once the package is in a stable state, how do I ensure that the module is pre-compiled – in the same way as a package that is installed using `Pkg.add()`? Such that it doesn’t recompile every time I open `julia` and include the module using `include("src/mypackage.jl")`. I added ` __precompile__ ()` to the top of this file, but that does not seem to work between `julia` sessions.

I haven’t quite figured out if I want to add this package using `PkgDev()`.
