Build and Run Workflow (v1)
This document defines the required project workflow used by run, clif, and analyze.
- Single project root (
Project.proj) plus transitive dependencies. - Source-only dependencies.
- Active provider:
path. - Deferred providers (infrastructure only):
git,registry.
Required lifecycle
Section titled “Required lifecycle”- Discover project manifest.
- Resolve dependency DAG.
- Validate provider scope.
- Sync
Project.lock. - Materialize dependency sources under
obj/beskid. - Project compile-unit projection in deterministic dependency-first order.
- Command execution (
run,clif,analyze).
Commands must not skip stages.
Directory layout
Section titled “Directory layout”obj/beskid/deps/src/- materialized dependency source trees.obj/beskid/build/- build outputs by profile and target.obj/beskid/state/- resolver/materialization metadata.
Materialization policy
Section titled “Materialization policy”- Copy dependency files from source roots into
obj/beskid/deps/src/<PackageId>/. - Copy only when source file is newer than materialized file.
- Compilation consumes materialized roots, not raw dependency paths.
Determinism rules
Section titled “Determinism rules”- Dependency order is deterministic and dependency-first.
- Tie-break on same rank: canonical manifest path lexical order.
- Package identity is canonicalized by manifest path and dependency source identity.
Failure policy
Section titled “Failure policy”- Build and run fail fast on unresolved dependencies.
- Provider-disabled sources fail at resolution stage.
- Lock or materialization errors fail before compile.
Diagnostics contract
Section titled “Diagnostics contract”Project workflow diagnostics use shared analysis diagnostics infrastructure and stable error codes.
Error codes
Section titled “Error codes”E3001: missingProject.projat ‘{path}’E3006: dependency ‘{dependency}’ manifest not found at {path}E3007: dependency cycle detected: {chain}E3008: unresolved external dependencies: {details}E3011: unsupported dependency source ‘{source}’ in v1E3022: lockfile is out of date for project ‘{project}’E3023: lockfile update forbidden in frozen modeE3031: failed to copy dependency source ‘{from}’ -> ‘{to}’: {source}E3033: build cannot start because dependencies were not materialized
CLI behavior recommendations
Section titled “CLI behavior recommendations”- Default mode: lock-aware with automatic lock creation/update.
- Future strict flags:
--frozen: no lock updates.--locked: require existing up-to-date lock.
Interop alignment
Section titled “Interop alignment”Interop migration must use the same lifecycle. Std is resolved as a regular dependency and loaded from materialized source roots.