This commit is contained in:
Nilton Constantino
2026-02-02 11:53:18 +00:00
parent e7cf5c36d6
commit ba61458a78
4 changed files with 373 additions and 49 deletions
-49
View File
@@ -1,52 +1,3 @@
## PR-10 — Dependency Resolver v0: build a resolved project graph
**Why:** We need a deterministic **module graph** from manifest(s) before compiling.
### Scope
* Implement `prometeu_compiler::deps::resolver`:
* Input: root project dir
* Output: `ResolvedGraph`
* Graph nodes:
* project identity: `{name, version}`
* local alias name (the key used by the parent)
* root path in filesystem (after fetch/resolve)
* manifest loaded for each node
* Resolution rules (v0):
* DFS/stack walk from root
* cycle detection
* collision handling:
* If the same (project name) appears with incompatible versions, error
* aliasing:
* alias is local to the edge, but graph also stores the underlying project identity
### Deliverables
* `resolve_graph(root_dir) -> Result<ResolvedGraph, ResolveError>`
* `ResolveError` variants:
* cycle detected (show chain)
* missing dependency (path not found / git not fetchable)
* version conflict (same project name, incompatible constraints)
* name collision (two distinct projects claiming same name)
### Tests
* simple root -> dep path graph
* cycle detection
* alias rename does not change project identity
### Acceptance
* Compiler can produce a stable, deterministic dependency graph.
---
## PR-11 — Dependency Fetching v0: local cache layout + git/path fetch
**Why:** Graph resolution needs a concrete directory for each dependency.