Skip to content

feat: recognise optional ingredients and cookware (cooklang 0.19) - #590

Merged
dubadub merged 3 commits into
mainfrom
chore/cooklang-0.19
Sep 30, 2026
Merged

dubadub merged 3 commits into
mainfrom
chore/cooklang-0.19

Conversation

@dubadub

@dubadub dubadub commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Bumps cooklang to 0.19.0 in the workspace (cookcli, cookcli-core, cooklang-format), with cooklang-reports 0.6.0 and cooklang-language-server 0.3.0, which were released on cooklang 0.19 so the tree has a single cooklang.

0.19 makes the optional marker from spec proposal 0018 core syntax, so with CookCLI's Extensions::empty() parser @?chives is now optional chives instead of an ingredient named ?chives. The existing optional rendering in human / markdown / LaTeX / Typst / schema output picks it up:

Ingredients:
  butter                10 g
  chives     (optional)
Cookware:
  splatter guard (optional)

Code change: RecipeItem in the shopping list store gets optional: false.

Shopping list handling of optional ingredients (--include-optional, selection lines, web UI) follows in separate PRs.

cargo test --all-features --workspace passes.

cooklang 0.19 parses the `?` marker (`@?chives`, `#?splatter guard{}`)
as core syntax (spec proposal 0018), so recipes using it now show those
items as optional instead of as ingredients named `?chives`.

Shopping list items gain an `optional` field; lists written by CookCLI
set it to false.
Both now depend on cooklang 0.19, so the tree has a single cooklang
again and the language server understands optional components.
@dubadub
dubadub merged commit 993766e into main Sep 30, 2026
5 of 6 checks passed
@dubadub
dubadub deleted the chore/cooklang-0.19 branch September 30, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant