-
v.1.2.0
Stablereleased this
2026-08-22 16:48:47 +02:00 | 914 commits to main since this releaseNew Features
- Parser & Kitchen: Introduced modular recipes and multi-file imports via the
@usedirective:- Import external base recipes directly into a recipe using
@use "./bases/shortcrust-pastry.gram" as &shortcrust. - Imported steps seamlessly interleave into the global ALAP scheduling timeline, preserving resting times and dependencies.
- Automatically scales imported base quantities when referenced with specific yields (e.g.
&shortcrust{250g}halves a 500 g base recipe). - Supports destructured multi-yield imports (e.g.
@use "./bases/tart-elements.gram" as { &crust, &frangipane }) scaling each component independently. - Supports multi-word bindings using bracket notation (e.g.
@use "..." as &pastry dough{}). - Resolves project-root paths (
@/bases/...) and custom path aliases defined underpaths:in.gram/config.yaml. - Added
--stockCLI flag to treat pre-made base imports as stock items (zero timeline overhead, single shopping list line, retaining full nutritional totals). - Supports retro-planning timeline offsets directly on
@useimport lines (e.g.@use "./bases/levain-starter.gram" as &starter ~{-2d}). - Spliced sections in HTML, Markdown, and print outputs display origin badges crediting their source module.
gram diffandgram watchnow track import additions, removals, rebinding, rescaling, and dependency file changes.- Language Server and VS Code extension support live dependency composition, Go to Definition into base files, path auto-completion, and quick-fix diagnostics for missing exports.
- Exported
createMemoryHostfrom@gram-lang/modulesfor browser and in-memory module graph resolution. - Corrected whole-recipe mass and nutrition totals to accurately include spliced intermediate (
-> &) masses. - Normalized rescaled ingredient quantities to one decimal place for display consistency across all outputs.
- Import external base recipes directly into a recipe using
- CLI: Added automatic update checking and a new
gram upgradecommand:- gram now checks npm in the background and prints a short "update available" notice after a command finishes (skipped in CI and non-interactive runs).
- Added
gram upgradeto check for and install the latest version on demand — it always performs a fresh check and asks for confirmation before running the install. - Added an
updateCheck: falsesetting inconfig.yaml(or theGRAM_NO_UPDATE_CHECKenvironment variable for a single run) to opt out of the passive notice.
- Parser & Kitchen: Composite ingredients written with a short, generic child name (like
@juice<@lemon) are now protected against a silent ingredient-database mix-up:- The compiler now warns when the same short composite name (e.g. "juice") is drawn from two different parents within one recipe (lemon in one step, orange in another) — until now this went unnoticed and the two usages silently shared one entry in the ingredient database.
gram db syncreports the same conflict across your whole recipe collection, so two unrelated recipes that happen to use the same generic composite name don't overwrite each other's nutrition and density data.- The AI recipe importer (
gram import) now writes composite ingredients with their full name (e.g. "lemon juice") instead of a short generic one, so newly imported recipes don't create this conflict in the first place.
Bug Fixes & Improvements
- Parser & Kitchen: Fixed
gram scale(and any other caller that re-scales an already-compiled recipe) silently leaving alternative ingredient groups (@butter|@margarine) and composite parent-draw quantities (@egg-yolks{2}<@eggs{3}) unscaled. - Parser & Kitchen: Improved clarity and tone for diagnostic messages and revised severity tiers:
- Reworded compiler and module diagnostic messages to provide actionable guidance and avoid alarmist phrasing for standard culinary approximations.
- Reclassified non-critical notices (
MISSING_MACROS,UNKNOWN_MASS,TRACK_CONTENTION) toinfoseverity so they do not clutter warning counters. - Enhanced Playground and editor diagnostic styling with dedicated color schemes for errors (red), warnings (amber), and notices (blue).
- Language Server: Normalized error states and unified diagnostic handling across Playground and VSCode extensions:
- Unified Playground diagnostics into a centralized full-width debug console with filter pills and interactive jump-to-location navigation.
- Added mobile segmented tab navigation (
[Editor]/[Preview]) and responsive single-row toolbar layout for mobile viewports. - Resolved nutrition diagnostics disconnection in the analyzer by merging physical and nutritional warnings into primary compiler warnings — the editor only turns these into squiggles when they carry a real position, so an incomplete-nutrition notice no longer misplaces itself at the top of the file.
- Markdown and print HTML exports keep their explicit "incomplete data" note next to the affected nutrition figures; the interactive HTML preview conveys the same gap through its coverage badge instead.
- A scale-target that fails to resolve (e.g. an unconvertible unit) now correctly turns the Playground's status badge and error panel red instead of being undersold as a warning, without marking the file tab as if the recipe itself had a syntax error.
- The Playground diagnostics console no longer gets stuck filtered on a category that just emptied out (e.g. after fixing the warning it was showing).
- Resolved silent compilation failures in the Language Server by capturing pipeline exceptions and pushing actionable error notifications to webviews — including when the thrown error carries no message, which previously slipped past the check silently.
- A compile-time failure (parses fine, but
compile()/analyze()throws) now also surfaces as an editor diagnostic, not only as a webview notification, so it's still visible with the preview panel closed. - Added bidirectional webview messaging in the VSCode extension to jump directly to error offsets in the active editor.
- Localized the Playground diagnostics console's collapse/expand tooltip, previously hardcoded in French regardless of site locale.
- Parser & Kitchen: Fixed a false circular reference warning when multiple sections used percentage-of formulas on same-named ingredients by scoping cycle detection per section.
Downloads
-
Source code (ZIP)
2 downloads
-
Source code (TAR.GZ)
6 downloads
- Parser & Kitchen: Introduced modular recipes and multi-file imports via the