pr 56
This commit is contained in:
@@ -1,47 +1,3 @@
|
||||
## PR-13 — Build Plan v0: deterministic compilation order
|
||||
|
||||
**Why:** We need a stable, reproducible pipeline: compile dependencies first, then the root project.
|
||||
|
||||
### Scope
|
||||
|
||||
* Implement `prometeu_compiler::build::plan`:
|
||||
|
||||
* **Input:** `ResolvedGraph`
|
||||
* **Output:** `BuildPlan` with topologically sorted build steps
|
||||
* Each `BuildStep` MUST include:
|
||||
|
||||
* `project_id` — canonical project identity (`prometeu.json.name`)
|
||||
* `project_dir` — absolute or normalized path
|
||||
* `target` — `main` or `test`
|
||||
* `sources` — ordered list of `.pbs` source files (from `src/<target>/modules`)
|
||||
* `deps` — dependency edge map: `alias -> ProjectId`
|
||||
|
||||
### Determinism Rules (MANDATORY)
|
||||
|
||||
* Topological sort must be stable:
|
||||
|
||||
* when multiple nodes have indegree 0, choose by lexicographic `project_id`
|
||||
* `sources` list must be:
|
||||
|
||||
* discovered only under `src/<target>/modules`
|
||||
* sorted lexicographically by normalized relative path
|
||||
* `deps` must be stored/exported in deterministic order (e.g. `BTreeMap`)
|
||||
|
||||
### Deliverables
|
||||
|
||||
* `BuildPlan { steps: Vec<BuildStep> }`
|
||||
|
||||
### Tests
|
||||
|
||||
* topo ordering stable across runs
|
||||
* sources ordering stable regardless of filesystem order
|
||||
|
||||
### Acceptance
|
||||
|
||||
* BuildPlan is deterministic and contains all information needed to compile without further graph traversal.
|
||||
|
||||
---
|
||||
|
||||
## PR-14 — Compiler Output Format v0: emit per-project object module (intermediate)
|
||||
|
||||
**Why:** Linking requires a well-defined intermediate representation per project.
|
||||
|
||||
Reference in New Issue
Block a user