# Dependencies
URL: https://lsd.tools/docs/pkg-dependencies
Updated: 2026-07-17

> The manifest's dependencies map pairs each required package with a version spec — *, an exact X.Y.Z, or >=X.Y.Z. LSD resolves them into a load order, freezes nodes whose dependency is missing, and reports both what a package requires and what requires it.

A package declares what it needs in the manifest's **`dependencies`** map: each key is another
package's `name`, each value a **version spec**.

```json
{
    "_schema_version": 1,
    "name": "lsd-mim-openpit",
    "version": "0.2.0",
    "dependencies": {
        "lsd-mim": ">=0.1.0",
        "lsd-spatial": "*"
    },
    "tool": "tool"
}
```

## Version grammar

Specs are deliberately minimal — no full semver. Four forms:

| Spec | Matches |
|---|---|
| `*` (or empty) | Any version |
| `X.Y.Z` | Exactly that version |
| `>=X.Y.Z` | That version or newer |
| `>X.Y.Z` | Strictly newer |

Versions compare numerically by dotted parts (`1.2.10` > `1.2.9`). So `">=0.1.0"` accepts `0.4.0`
but rejects `0.0.9`.

## Resolution & load order

When a package loads, LSD checks each dependency against what is installed and computes a
**load order** so dependencies mount before the packages that use them (topologically, and safely
even if the graph has a cycle). Ask for a package's full picture with
[`dependency_report(name)`](/docs/api-package-manager):

```python
report = pm.dependency_report("lsd-mim-openpit")
# → which deps are satisfied, which are missing or too old
```

## Missing dependencies freeze, they don't crash

If a required package isn't installed (or is too old), the dependent package's nodes are not dropped
— they become **frozen placeholders** that serve their last cached output and skip recomputation.
Your project stays intact. Install or enable the missing package and call
`reinstantiate_placeholders` (the Package Manager does this for you) to bring the real nodes back.
See for how frozen nodes behave.

## Required-by (reverse dependencies)

The other direction matters when you remove or disable a package. Ask which packages depend on one
with [`dependents_of(name)`](/docs/api-package-manager):

```python
pm.dependents_of("lsd-mim")
# → ["lsd-mim-openpit", "lsd-mim-underground"]
```

The Package Manager surfaces both directions on each package's detail pane — a **Requires** list and
a **Required by** list — with a warning marker when a dependency is missing or too old.

Paid dependencies are checked at purchase time: buying a package whose dependencies include other
paid packages you don't own returns a "missing dependencies" prompt listing what to get first. See
[Buy & install](/docs/pkg-store-install).

## Related

**Learn** — [The Package Manager](/docs/pkg-manager) · [Package anatomy](/docs/pkg-anatomy)

**API** — [PackageManager](/docs/api-package-manager) · [lsd_package.json](/docs/api-manifest)

**Examples** — [A complete package](/docs/ex-full-package)

## FAQ
### What version specs can I write?

Four forms — "*" (any version), exact "X.Y.Z", ">=X.Y.Z", and ">X.Y.Z". Versions compare numerically by dotted parts. An empty or missing spec means any version.

### What happens if a dependency isn't installed?

The dependent package's nodes become frozen placeholders that serve their cached output instead of recomputing — no data is lost. Install or enable the missing package and the nodes come back to life.
