Skip to content

Commit f09508a

Browse files
reid-spencerclaude
andcommitted
Document the two silent breaking changes for AST consumers
Everything else in the 2.0 breaking-changes list announces itself as a parse or validation error. These two keep consuming Scala compiling while changing what it does, so a clean build is not evidence of a clean migration -- which is how riddl-generator silently lost every event handler and synapify hit four sites of the same shape. `OnEventClause` is now a SIBLING of `OnMessageClause`, so a `case _: OnMessageClause` compiles unchanged and stops matching event handlers, with missing output rather than an error as the symptom. Both extend `OnMessageLikeClause`, verified at AST.scala:3707/3778/3823, and the guide names that parent -- "match on the common parent" is only actionable if the parent is named. `object StreamletShape` (AST.scala:4401) shadows a consumer's own type of that name under `import AST.*`, and the resulting error points at AST.StreamletShape rather than at the import. Requested by riddl in task/add-silent-breaking-changes-to-2.0-migration- guide.md; all three task files are now reconciled and moved to done. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 2758ea0 commit f09508a

2 files changed

Lines changed: 94 additions & 7 deletions

File tree

NOTEBOOK.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ to the task file and note completion in this notebook.
1313

1414
## RESUME HERE — as of 2026-08-03
1515

16-
**Tasks A–K are all closed.** What is still open:
16+
**Tasks A–K are all closed, and `task/` is empty** (everything in `task/done/`).
17+
What is still open:
1718

18-
- `task/publish-riddl-license-page.md` — needs a change in **riddl**, not here;
19-
see the note at the end of TASK C.
2019
- The ~50 concept pages still lack per-fence directives. 26 fences fail
2120
site-wide against rc.9, but no file is above three, which is the agreed
2221
threshold — a known gap, not a regression.
@@ -30,6 +29,35 @@ The sections below are kept as the record of how the current state was reached.
3029

3130
---
3231

32+
### Task-queue triage ✅ **2026-08-03**
33+
34+
Reid's point — *if it needs a change in riddl, drop a task there or it will
35+
never happen* — turned out to apply to the tracking itself. All three files in
36+
`task/` were reconciled:
37+
38+
- **`publish-riddl-license-page.md`** — needed **no** riddl task. riddl had
39+
already changed all three places in `733573373` (2026-07-30), the same day
40+
our "still outstanding" note was written. The note was stale from the moment
41+
it was filed and sat on the open list for four days because nobody re-checked
42+
the other repo. Verified end to end: `riddlc info` prints
43+
`/riddl/2.0/licenses/`, which returns 200.
44+
riddl's reason is better than ours, and worth keeping: notices describe the
45+
dependencies of **that** release, so a `/latest/` page would show a 2.0 user
46+
the notices of a future build. Version-pinning is right on its merits.
47+
- **`activate-verb-now-parses.md`** — already done; `element.md` documents both
48+
spellings and carries no caveat.
49+
- **`add-silent-breaking-changes-to-2.0-migration-guide.md`****genuinely
50+
outstanding**, and the one that would have been lost. Now done: the migration
51+
guide has a "Silent changes for tools that read the AST" section covering the
52+
`OnEventClause`/`OnMessageClause` split and `AST` companion shadowing. Both
53+
claims were re-verified against `AST.scala` rather than trusted — the shared
54+
parent is `OnMessageLikeClause` (line 3707), which the guide names, because
55+
"match on the common parent" is only actionable if the parent is named.
56+
57+
**Lesson:** two of three were already done and one was quietly rotting. Check
58+
`task/` against the *other repo's* current state, not against what the task file
59+
says about it.
60+
3361
### TASK K — AST / Finder / Pass API documentation ✅ **DONE 2026-08-03**
3462

3563
New page: `guides/developers/ast-api.md`. Nothing existed — the developer guide
@@ -559,10 +587,16 @@ removal of the old root-level `1.31/ 2.0/ latest/ next/`. Deleting the old
559587
layout *last* rather than first meant no outage — the old URLs kept serving
560588
until their replacements were live.
561589
562-
**Still outstanding:** `task/publish-riddl-license-page.md`. The page is live at
563-
`/riddl/2.0/licenses/`, but `riddlc info` still prints `/riddl/licenses/`, which
564-
404s and cannot be made to work — the second path segment is a version. riddl
565-
must change three places, not the one the task file mentions.
590+
**Closed 2026-08-03:** `task/publish-riddl-license-page.md` is in `task/done/`.
591+
The note that used to sit here said `riddlc info` still printed the unversioned
592+
`/riddl/licenses/` and that riddl had to change three places. **riddl had
593+
already changed all three** — commit `733573373`, 2026-07-30, the same day this
594+
note was written. It was stale from the start and stayed on the open list for
595+
four days because nobody re-checked the other repo.
596+
597+
Verified end to end: `riddlc info` prints `/riddl/2.0/licenses/`, and that URL
598+
returns 200 with the notices. Bump the constant, its test and
599+
`THIRD-PARTY-NOTICES.txt` together on each documented minor release.
566600
567601
**Known wart:** the merge to `main` bypassed a branch-protection rule ("must not
568602
contain merge commits") because it was `--no-ff`. It was allowed through rather

sites/riddl/docs/migration/1.x-to-2.0.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,59 @@ work.
224224
- A context-scoped connector whose ends cross contexts is under-scoped
225225
- An ascribed shape that contradicts the declared port arity is an Error
226226

227+
### Silent changes for tools that read the AST
228+
229+
Everything above announces itself as a parse or validation error. **These two do
230+
not.** They change the RIDDL libraries' Scala API in ways that keep consuming
231+
code compiling while changing what it does, so a clean build is not evidence of
232+
a clean migration. Both cost real debugging time — the first in
233+
riddl-generator, the second in synapify and sim-engine.
234+
235+
Skip this if you only write RIDDL; it matters only if you write Scala against
236+
`AST`.
237+
238+
#### `on event` clauses no longer match `OnMessageClause`
239+
240+
`OnEventClause` is now a **sibling** of `OnMessageClause` rather than a subtype.
241+
Both extend `OnMessageLikeClause`.
242+
243+
So this keeps compiling and silently stops matching event handlers:
244+
245+
```scala
246+
case omc: OnMessageClause =>// no longer sees `on event` clauses
247+
```
248+
249+
The symptom is **missing output, not an error** — a generator quietly emits
250+
nothing for events. Match on the shared parent instead, or add an explicit case:
251+
252+
```scala
253+
case c: OnMessageLikeClause =>// both kinds
254+
// or
255+
case omc: OnMessageClause =>
256+
case oec: OnEventClause =>
257+
```
258+
259+
#### New `AST` companions can shadow your own types
260+
261+
2.0 adds companion objects to `AST`, including `object StreamletShape`. If you
262+
have a type of the same name — sim-engine has a `StreamletShape` enum, and so
263+
would any tool modelling shapes — and you use a wildcard import, RIDDL's
264+
companion shadows yours, and the error points away from the cause:
265+
266+
```
267+
value Source is not a member of object AST.StreamletShape
268+
```
269+
270+
Your enum is intact; the import is the problem. Import selectively, or rename
271+
on import:
272+
273+
```scala
274+
import AST.{StreamletShape => _, *}
275+
```
276+
277+
See [AST, Finder and Passes](../guides/developers/ast-api.md) for the API more
278+
generally.
279+
227280
---
228281

229282
## 2. Deprecations

0 commit comments

Comments
 (0)