dowel

ADR-0015: Resolve version dependencies through pkg-config, record them in dowel.lock

Status: Accepted

Context

dowel.toml accepts three dependency forms: path, git, and version. The first two were implemented; version = "..." was refused with a diagnostic. The C/C++ world has no single canonical registry (docs/00-overview.md), and ADR-0001 already decided that dowel owns the toolchain but delegates dependency supply. Building a native registry client (index protocol, tarball fetching, checksums, a version-constraint solver) would contradict that delegation and carry a large maintenance surface for little gain: on every practical target the system already has a working resolver for installed C/C++ libraries — pkg-config.

Unlike path (the content is local) and git (the rev pins the content), a system package is whatever the environment happens to have. That makes the resolution non-reproducible by nature, which calls for a record of what was resolved so a changed environment is noticed rather than silently used.

Decision

version = "..." dependencies are resolved by delegating to the system pkg-config:

Each resolution is reconciled against dowel.lock at the workspace root:

Editor sessions (load_for_editor) start no external processes: version dependencies are left unresolved in the LSP, and unsatisfied-dependency / lockfile-drift never originate from the language server.

Consequences