Repository navigation
v0.0.1-alpha.32
Immutable
release. Only release title and notes can be modified.
This release includes a major internal refactor of the compiler and evaluator that encodes invariants in types rather than conventions.
Along the way, it fixes a series of name-resolution and dimension-checking bugs, some of which allowed dimensionally wrong programs to pass type checking.
Some existing Graphcal source programs may need to be modified. Most of the breaking changes reject programs that were previously accepted only because of a bug. See Breaking Changes.
Breaking Changes
Name Resolution and Imports
- The undocumented legacy spelling
@alias.memberfor namespace members has been removed.
Use@alias::member.
A.after a graph reference is now always field access, so@inst.outon a struct node namedinstno longer silently resolves to an include member instead of the field.
(#1722) - An include or import alias can no longer share its name with a local declaration.
For example,include d(...) as inst;together withnode instis now rejected with N001, matching the existing cross-file behavior.
An alias that only respells its own one-segment local DAG is still allowed.
(#1780) - A file submodule
lib/x.gcland an inlinedag xinlib.gclare now reported as an explicit module-path ambiguity instead of one taking priority.
A module aliaslforlib.gclno longer reaches the file submodule throughl.x.
(#1782) - In package mode, an inline-DAG body import that escapes the package root, for example, through a symlink, is now rejected with
ImportOutsideRoot, as file-root imports and loose mode already were.
(#1789)
Dimension and Unit Checking
- Dimension names in
dimdeclarations,unitdeclarations, and required coordinate indexes are now resolved by qualified name. Previously they were looked up by leaf name against a flat table, so a qualified name could resolve to the wrong module, an unbound qualifier such aszzz::Lengthwas accepted, and a dimensionally wrong program could pass type checking. (#1723) - A renamed selective import or include projection (
dim X as Y,unit X as Y) now binds only the local nameY. The source nameXno longer leaks intodim,unit, andconst unitdeclarations. Unit aliases also resolve correctly inside unit expressions. (#1750, #1760) - An included DAG's dimension no longer replaces the importer's dimension of the same name. Programs that relied on that replacement are now checked against the importer's own definition. (#1763)
- Rebinding a defaulted bindable dimension, such as
pub(bind) dim Q = Length;withinclude lib(dim Q: Mass, ...), is now honored for file modules, inline DAGs, and nested includes. Programs that type-checked only because the rebinding was ignored are now rejected. (#1821) - An unused inline DAG whose
dimorunitdeclarations name the parent's bare dimensions or units is now rejected, consistent with the included case. Aninst::Xinclude alias is no longer accepted indimorunitdeclarations. (#1807) - A dimension exponent of exactly −2³¹ is now rejected with
DimensionOverflow. (#1740)
Newly Accepted Programs
- A derived dimension over a bindable dimension can now be projected through an include, for example
pub(bind) dim Q; pub dim QR = Q / Time;used asinclude blib(dim Q: Length)::{dim QR, rate}. (#1763) - A projected dimension bound to an importer-local dimension is specialized, type-system self-imports of an included inline DAG resolve, and a specialized projected type may reference other template types. (#1807)
- Selective includes of a
const nodefrom an inline DAG, such asinclude lib(v: @x)::{ k as kk }, now work. (#1783) import plugininside a nesteddagbody now works. The plugin is loaded, validated, policy-checked, and pinned bygraphcal deps lock, and a missing.wasmfile is reported at its import. (#1721)
Bug Fixes
graphcal model serverows now evaluate assertions projected from included DAGs, so a row with a failing included assertion is no longer reported as a success. A runtime error inside an included DAG is reported as a row failure instead of terminating the server. (#1718, #1855)- A cycle through an include port binding, such as
include lib(x: @a) as inst; node a = @inst::out;, is now reported asCyclicDependencybygraphcal checkinstead of failing at evaluation with an internal error. The node reported for longer cycles is now deterministic. (#1826) - When an included assertion was the target of
#[assumes]both inside its DAG and through an include projection, one of the links could be lost depending on hash order. Both are now kept. (#1806) - A
scanwhose union accumulator starts from a constructor with a converted field and whose step returns another constructor no longer fails with internal error X001. (#1863) - Several defects that surfaced as internal errors now report proper diagnostics. These include an import/include name clash (now N001), a mismatched dimension variable bound by an array parameter in an extern signature (now D001), and a dimension exponent that overflows through a template binding (now D010). Diagnostics also no longer leak dependency-private dimension names. (#1783, #1807, #1922)
- Equality of public struct values now distinguishes constructors and generic arguments, so
CoastandBurnof one union type, orFramed<Eci>andFramed<Ecef>, no longer compare equal. Rendered output is unchanged. (#1719)
Clearer Failure Reports
- BLOCKED, TODO, and failed-dependency lists, as well as "dependency failed" messages, now show output names such as
l::pendinginstead of internal identities such assrc.demo.main.<include@44>.pending. This applies to CLI text, JSON, Wasm, and model outputs. JSONfailed_depsnow carries full output names instead of leaf names. (#1923) - Composed plots name each unavailable plot the way the root names it, for example
dependency failed: broken, showninstead ofmain.broken, main.<include@109>.inner. (#1861) - A failing private value of an aliased include is labelled with the alias, and
--output-view alllists instance values under the alias without duplicate copies under the module name. (#1855) - Instance plot axes for a rebound dimension port show the bound dimension. (#1821)
- Independent parameters, nodes, and constants are evaluated in source order. (#1826)
Branding and Documentation
- The README and the English and Japanese documentation headers now show the Graphcal wordmark, with theme-aware variants for light and dark palettes. The README was trimmed to the essentials. (#1698, #1699, #1903)
- Documentation builds no longer depend on experimental browser tests. (#1706)
Dependency, Toolchain, and Workflow Maintenance
- Migrated to Vite+ v1. (#1905, #1916, preceded by #1683, #1695, #1888)
- Updated Rust crates:
arrow-rsto v60,clapto v4.6.7,faster-hex,gixto v0.88.0,jiffto v0.2.37,randto v0.10.3,rustlsto v0.23.45,synto v3.0.6,thiserrorto v2.0.21,wasm-bindgen, andwatto v1.260.0.yoke-deriveis pinned to v0.8.2 because v0.8.3 was yanked. (#1676, #1672, #1704, #1712, #1665, #1692, #1674, #1681, #1703, #1710, #1904, #1873) - Updated Node.js to v24.21.0, CodeMirror,
@lezer/highlightto v1.2.5,@types/nodeto v26.6.3,zodto v4.6.5, and Zensical through v0.0.64. (#1889, #1686, #1709, #1725, #1921, #1666, #1689, #1696, #1797, #1667, #1669, #1677, #1680, #1675, #1687, #1693, #1720, #1838) - Updated
astral-sh/setup-uvto v10.2.0,codecov/codecov-actionto v7.1.1,crate-ci/typosto v1.50.2,voidzero-dev/setup-vpto v1.21.1,zizmorcore/zizmor-actionto v0.6.4, andtaiki-e/install-actionthrough v2.87.20. (#1684, #1787, #1697, #1705, #1701, #1691, #1708, #1786, #1679, #1664, #1668, #1673, #1678, #1682, #1688, #1690, #1702, #1707, #1711, #1713, #1742, #1839, #1872, #1925) - Lock file maintenance, and
pnpm dedupenow runs after Renovate lockfile updates. (#1670, #1694, #1756, #1724)
Internal
- Completed Phases 0–10 of the invariant/complexity refactor. Highlights:
- Typed names, qualified paths, parse errors, and module paths replace string encodings. A single resolver with typed symbols and typestate construction replaces the alias-keyed registry. (#1727–#1735, #1748, #1764–#1785, #1789, #1791)
- HIR is parameterized by completeness and keyed by resolved declaration identities. Static definitions are evaluated canonically on demand. (#1788–#1810)
- Type checking produces a unified
CheckedType, typed diagnostics, and typed expression trees (TExpr) that the evaluator executes directly. Checked programs are sealed with their schedules and constant pools. (#1811–#1837) - Evaluation plans are indexed over borrowed sealed programs, and runtime values, keys, presentations, and built-in calls are typed by construction. (#1840–#1871)
- Project loading moved into
graphcal-project. Module cycles were removed,GraphcalErrorwas replaced by per-phase typed errors with structural cancellation, and internal-error construction points were reduced. (#1874–#1887, #1917, #1918, #1920, #1922, #1923) - Shared foundations: phase-lift and format-equivalence derives,
Outcome/Diagnostic,DependencyOrdered/DependencyGraph, a singleRatio<T>,SparseMonomial, checked unit scales, and typed built-in families. (#1736, #1737, #1739–#1741, #1743, #1744, #1746, #1747, #1749, #1751, #1752, #1754, #1755, #1758, #1761, #1762)
- Added a ratcheted refactor-metrics check, an output golden for every checked-in Graphcal source, and a generated, CI-checked reading order in the codebase reading guide. (#1715, #1716, #1757)
- Brought internal documentation in line with the code. (#1714, #1924)
- Stabilized report browser tests and tracked mutation-test findings. (#1685, #1700, #1671, #1775)
- Bumped the workspace version to v0.0.1-alpha.32. (#1926)
Full Changelog: v0.0.1-alpha.31...v0.0.1-alpha.32