Package development is iterative: edit a definition, try it in the Julia REPL, then edit it again. Revise helps keep that loop moving. It monitors changes to packages loaded after Revise and updates their definitions in the REPL. section 16.3 section 16.6
Set up a working environment for the loop:
- Add Revise to your working environment rather than making it a dependency of the package you are building. section 16.3
- Use the package manager’s `dev` command with the local package directory instead of `add`. The working environment then knows where to find the developing package. section 16.3
- Load Revise before the package whose changes you want it to monitor. section 16.6
Working on a local package
In a hobby environment, add Revise and run `dev ./ToyGeometry` for a local package. After loading Revise and then ToyGeometry, edits to the loaded package can be reflected in the REPL as you test its functions. The `dev` step and Revise serve different purposes: one makes the local package available to the environment; the other monitors changes after loading. section 16.3 section 16.6
shell> pwd ~/dev/hobby shell> ls Manifest.toml Project.toml ToyGeometry (hobby) pkg> dev ./ToyGeometry Resolving package versions... Updating `~/dev/hobby/Project.toml` [bbcec4ee] + ToyGeometry v0.1.0 `ToyGeometry` Updating `~/dev/hobby/Manifest.toml` [bbcec4ee] + ToyGeometry v0.1.0 `ToyGeometry`
The package-manager transcript shows how `dev ./ToyGeometry` registers a local package in the working environment. section 16.3
