book: guide chapter modelling data (data or capsule, builder, map key, conversions) #636
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice of #587 (Guide chapters), which is a slice of the epic #582. Second chapter; #607 (first project) is merged. Governing note:
book/CONCEPT.md("How a page is written", "What CI checks"). Touches the seed: no (documentation only; no syntax change, no native, no driver flag, no std name looked up by the compiler).Goal
Write the Guide chapter
book/guide/modelling-data.md: describing data with types, choosing betweendataandcapsule, building values with a builder, using a type as a map key, and converting between types. Read likebook/guide/handling-errors.md(the merged vertical slice from #585) andbook/guide/first-project.md: one example that grows across the sections.Replaces in
docs/docs/language/types/data-or-capsule.mddocs/how-to/write-a-builder.mddocs/how-to/use-a-type-as-a-map-key.mddocs/how-to/convert-between-types.mdAbout 21 KB of old material, one chapter; no further narrowing needed.
Acceptance criteria
book/guide/modelling-data.mdexists with kindpage,status: stable, front matter in the shape of the other guide chapters (title,summary,order,keywords), and is written asbook/CONCEPT.md, "How a page is written", says: the first paragraph says in two to four sentences what the page covers, headings name ideas, prose first, no history words, no internal references (no issue numbers, no links intodocs/design,docs/contributing,docs/internals,CONCEPT.md), no Related/Next/See also sections, lists of at most seven items, every section starts with a sentencetrb runandtrb errorblock is followed by itsoutputblock with the real output (atrb errorblock shows whattorb checkprints, fromerror:on); aproject.trbis shown as a baretrbblock; no fragments, no// printscommentsdataandcapsuleand when to use which, fields and defaults, a builder, a type as a map key (what it needs to derive), and conversions between types (From/Into, parsing, and what fails)book/guide/index.mdlists the new chapter (generated block viatorb docs index book);torb docs check book,torb docs index --check bookandtorb docs site book --checkpass, andtools/gates.shpasses in CItorb docs skill docs skillsgenerates the skills; for every old page a skill still needs, it stays indocs/unpublished and the PR description names it and why); the others are deleted together with every link to them, and the skills are regenerated sodocs skill --checkstays greentour/,start/,reference/,std/) is changed except the links that must follow from the deletion; the other five chapters of #587 are not startedNotes for the implementer
book/CONCEPT.md,book/guide/handling-errors.mdandbook/guide/your-own-constructs.mdandbook/guide/first-project.mdfirst; run the examples withtorbbefore pasting their output.docs(book): guide chapter modelling dataand, if needed,docs: retire the pages the chapter replaces.[loop:torbscript] claim implement by session:loop-torbscript-20261030 until 2026-10-30T05:51Z
[loop:torbscript] checkpoint: pushed loop/636-guide-modelling-data; PR #645 open (Closes #636), review requested from argus, waiting on forge CI. The four old pages stay in docs/ (skills still carry them).
[loop:torbscript] checkpoint: PR #645 open (
c5c83a68). Green: commit messages, what the change touches, pdisc. Still pending after more than 1 h in the runner queue: gates and the platform jobs.docs check bookanddocs site --checkwere not judged locally (the local nightly does not run book mode), so gates is the first real verdict. The old pages stay in docs/.[loop:torbscript] release implement: PR #645 (head
c5c83a68) is open and in review. Green: commit messages, touches, pdisc.gatesis still queued; it is the first real check ofdocs check bookanddocs site book --check, since the local nightly has no book mode. Old pages stay in docs/ for now; retiring them is a follow-up after CI is green. CI and Argus decide.