Expand description
Dependency resolution from shape.toml
Resolves [dependencies] entries to concrete local paths:
- Path deps: resolved relative to the project root.
- Git deps: cloned/fetched into
~/.shape/cache/git/and checked out. - Version deps: resolved from a local registry index with semver solving.
§Semver solver limitations
The registry solver uses a backtracking search with the following known limitations:
- No pre-release support: Pre-release versions (e.g.
1.0.0-beta.1) are parsed but not given special precedence or pre-release matching semantics beyond whatsemver::VersionReqprovides. - No lock file integration: The solver does not read or produce a lock
file. Each
resolve()call recomputes from scratch. - Greedy highest-version selection: Candidates are sorted highest-first. The solver picks the first compatible version and only backtracks on conflict. This can miss valid solutions that a SAT-based solver would find.
- No version unification across sources: A dependency declared as both a path dep and a registry dep by different packages produces an error rather than attempting unification.
- Exponential worst case: Deeply nested constraint graphs with many conflicting ranges can cause exponential backtracking. In practice, Shape package graphs are small enough that this is not an issue.
Structs§
- Dependency
Resolver - Resolves dependency specs to local filesystem paths.
- Resolved
Dependency - A fully resolved dependency ready for the module loader.
Enums§
- Resolved
Dependency Source - Source classification for a resolved dependency.