Skip to content

docs(ion): fix the match spelling and define the collapsed record - #1133

Open
DamianReeves wants to merge 1 commit into
mainfrom
DamianReeves/ion-draft-record-shape
Open

DamianReeves wants to merge 1 commit into
mainfrom
DamianReeves/ion-draft-record-shape

Conversation

@DamianReeves

Copy link
Copy Markdown
Member

Two corrections to the Ion draft, and one stale knowledge base note. All three came up while planning an Ion reader for finos/morphir-dotnet. Refs #946.

Changes

  • match row. The table wrote (match scrutinee [pattern body] [pattern body]), which is not legal Ion because list items need commas. It now writes [pattern, body]. This matches the draft's canonical text rules and what the writer already emits.
  • Collapsed record. The draft says a reader accepts a record but never named its members. It now defines the dependencies and modules lists that the Rust reader expands, with an example.
  • Knowledge base. ion-ir-format.md said the v4 reader refuses a record. That is no longer true, so I removed the note and updated the text and the log.

No reader or writer behavior changes. Because the draft now documents what the codec already does, I did not update discussions 938 and 942. Say if you want them updated too.

Evidence

I ran the morphir v0.4.0-beta.12 release (aarch64-pc-windows-msvc, SHA-256 checked) with ir migrate:

Input Result
v3 library, as a record and as a datagram Byte-identical JSON
v4 library, as a record and as a datagram, including a match body Byte-identical JSON
v4 specs, as a record and as a datagram Byte-identical JSON
v4 application, as a record and as a datagram Byte-identical JSON
The new draft example Reads successfully
JSON back to Ion Writes the match case as [, _,, 1,, ] on separate lines

Separately, Eleven19.IonDotnet rejects [_ ()] and accepts [_, ()].

Not in this PR

  • Bead morphir-vvgi.8 ("Ion v4: read the collapsed morphir:: record") is still open and looks ready to close.
  • The only direct v4 record test I found is in ion_linked_metadata.rs, for the linked-metadata draft. 0.1.0-draft.1 v4 records may want their own test in finos/morphir-rust.

I did not run mise run check locally. This PR relies on CI for those checks.

🤖 Generated with Claude Code

The draft's match row wrote `[pattern body]`, which is not legal Ion because
list items need commas. The reference writer emits `[_, 1,]`.

The draft says a reader accepts a collapsed `morphir::` record but never named
its members. Define the `dependencies` and `modules` lists that the Rust reader
expands. The knowledge base still said the v4 reader refuses a record. CLI
0.4.0-beta.12 reads v3 library and v4 library, specs and application records to
JSON byte-identical to the equivalent datagrams.

Found while planning the Ion reader for finos/morphir-dotnet.
@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for angry-raman-7c44f6 ready!

Name Link
🔨 Latest commit 30fe7bb
🔍 Latest deploy log https://app.netlify.com/projects/angry-raman-7c44f6/deploys/6ae7d6e99981148281e5aa2e
😎 Deploy Preview https://deploy-preview-1133--angry-raman-7c44f6.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T00:19:37.898310Z 30fe7bb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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