liveBook · Manning

Dev command

As explained in Julia as a Second Language

The dev command is a Julia package-manager command that adds a package from a specified local directory for active development.

A package you are developing can exist on disk yet remain unavailable in your current Julia environment. The package manager’s `dev` command adds that local package by directory path. Unlike `add`, which captures a package version, `dev` lets the environment load your latest code changes without an explicit package update. 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`

From the working environment, `dev ./ToyGeometry` adds the package in the neighboring directory and updates `Project.toml` and `Manifest.toml`. section 16.3

Afterward, `using ToyGeometry` can find the package. `dev` makes the package available; it does not automatically make every function callable without its module prefix. That requires the package to export those names. Revise has a separate role: monitoring changes to packages loaded after it. section 16.3 section 16.6

How Julia as a Second Language covers it

How deep it goes
Demonstrates the directory-path command, environment-file updates, and package loading without detailing package-manager internals.
Examples
Shows `ToyGeometry` missing from an environment, then `dev ./ToyGeometry`, updated environment files, and successful loading with `using ToyGeometry`.
What it assumes
Assumes a local package directory and a working environment; demonstrates how to register the package there rather than how to create it.
What you can do after
Apply it via Julia’s package manager to add a local development package and load its latest code without an explicit update.
How it connects
Connects local package development with Julia environments, `activate`, `add`, `using`, `Project.toml`, `Manifest.toml`, and Revise.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Julia as a Second Language. The section links point to the parts of the book it draws on.