Skip to main content
Language v0.2.0 · Preview

Bounded N/M multi-file workspaces

Define a versioned workspace manifest, index imports without recursive-stack risk, and diagnose duplicate, missing, cyclic, oversized, or unsafe workspace inputs.

Workspace manifest 0.1 contract

The public JSON Schema and runtime validator reject unknown fields, unsafe paths, unsupported versions, oversized manifests, and entry files outside declared source roots.

/schemas/nm-workspace-manifest-0.1.schema.json
Documents
5,000
Aggregate source
5 MB
Imports per module
256
Source roots
16
Path UTF-8 bytes
512
Manifest JSON
64 KiB

Iterative import graph

Indexing, cycle detection, transitive reachability, and reverse-dependent traversal are iterative and bounded. A 5,000-module chain is part of the performance and stack-safety contract.

Bounded incremental re-indexing

After one document changes at the 5,000-document limit, exactly 1 lexical analysis is recomputed and 4,999 are reused. A sustained 25-edit p95/RSS ratchet also proves that dependency and reverse-dependency edges are replaced without retaining stale links.

analyzed=1reused=4,999

Canonical path boundary

Manifest paths normalize to NFC, accept platform separators, remain relative, reject traversal, control and bidi characters, and must stay within a declared source root.

CLI workflow

nm check src/main.nmnm lint src/main.nm --strictnm workspace snapshot src/main.nm

Stable workspace diagnostics

Graph and manifest failures use stable codes for duplicate modules or URIs, missing imports, cycles, limits, malformed fields, and unsupported versions.

NM-WORKSPACE-001NM-WORKSPACE-002NM-WORKSPACE-003NM-WORKSPACE-004NM-WORKSPACE-005NM-WORKSPACE-MANIFEST-PARSE-001NM-WORKSPACE-MANIFEST-TYPE-001NM-WORKSPACE-MANIFEST-FORMAT-001NM-WORKSPACE-MANIFEST-VERSION-001NM-WORKSPACE-MANIFEST-REQUIRED-001NM-WORKSPACE-MANIFEST-LIMIT-001NM-WORKSPACE-MANIFEST-UNKNOWN-001NM-WORKSPACE-MANIFEST-DUPLICATE-001