# A script that makes my pkg development workflow smooth

**URL:** https://discourse.julialang.org/t/a-script-that-makes-my-pkg-development-workflow-smooth/127938
**Category:** Tooling
**Created:** [April 10, 2025, 4:38pm UTC](https://discourse.julialang.org/t/a-script-that-makes-my-pkg-development-workflow-smooth/127938 "2025-04-10T16:38:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![guimarqu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/guimarqu/32/211057_2.png) [@guimarqu](https://discourse.julialang.org/u/guimarqu)
#### Post date: [April 10, 2025, 4:38pm UTC](https://discourse.julialang.org/t/a-script-that-makes-my-pkg-development-workflow-smooth/127938/1 "2025-04-10T16:38:40Z")

</div>

Hey all,

No question here, I just want to share the central tool of my development workflow I have used for years now.

Three years ago, I was working on an Angular project and I was amazed by the tooling. Especially, the `ng serve` command. Basically, you run `ng serve` while writing your code. It auto-refreshes the web app in the browser each time you save a file. It makes development incredibly smooth!

So back on a Julia package project, I wanted a similar tool. I wanted to see immediately whether my unit tests passed as soon as I saved a file with new changes . Together with a colleague, we built a first version of this tool using Revise. I later improved the tool to refresh the tests whenever code changes occur in either the package or the tests.

I created an “EmptyPackage” repository to share the scripts and the architecture :

[GitHub - nablarise/EmptyPackage.jl](https://github.com/nablarise/EmptyPackage.jl)

To run the tool :

- run the `runtests.sh` script.
- the script calls `julia runtests.jl auto` to execute the `run_tests_on_change` defined in `test/revise.jl`

To use this tool in your package :

- copy [`runtests.sh`](https://github.com/nablarise/EmptyPackage.jl/blob/main/runtests.sh), [`test/revise.jl`](https://github.com/nablarise/EmptyPackage.jl/blob/main/test/revise.jl)

- put your tests in a module and call your tests functions from a [`run()`](https://github.com/nablarise/EmptyPackage.jl/blob/a49ffc0933fe464923b49820fcf521ed3a45c21c/test/EmptyPackageUnitTests/EmptyPackageUnitTests.jl#L7) function

- copy [`test/runtests.jl`](https://github.com/nablarise/EmptyPackage.jl/blob/main/test/runtests.jl) and follow the instructions provided (Steps 2, 3, 4, 5).

It’s far from perfect. It suffers from the “limitations” of Revise/Julia. You’ll need to restart the tool when changing a type for instance. I’m also pretty unsure about how I handle the exceptions 🙂 However, all the errors are clearly displayed in the console and the tool makes me more productive!!!

Feedback and suggestions are welcome!

---

<div class="post-metadata">

### Author: ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)
#### Post date: [April 11, 2025, 10:57am UTC](https://discourse.julialang.org/t/a-script-that-makes-my-pkg-development-workflow-smooth/127938/2 "2025-04-11T10:57:21Z")

</div>

Very cool! Also, with 1.12 and upcoming updates to Revise, updating types will no longer require restarts!
