Skip to content

docs(parser): the direct C++ bridge stays in 1.x and freezes builtin layouts - #237

Merged
facontidavide merged 1 commit into
mainfrom
docs/parser-bridge-contract
Nov 14, 2026
Merged

facontidavide merged 1 commit into
mainfrom
docs/parser-bridge-contract

Conversation

@facontidavide

Copy link
Copy Markdown
Contributor

Why

Four documents and three header comments said "SDK 1.0 removes the bridge", the path where a host casts a parser's opaque context to MessageParserPluginBase* and calls parseObject().

That is not what happens. PlotJuggler main contains no use of pj.parser_functional.v2; it passes MessageParserPluginBase* through the session manager and the scene2D image, depth and video pipelines, for every parser. Shipping 1.0 with the old text would publish a promise the only host breaks.

What changes

Docs, header comments and the changelog only. No code token changes.

  • The bridge is described as deprecated but supported through 1.x.
  • pj_plugins/docs/ARCHITECTURE.md section 0a gains the rule that follows from it. While a host casts, these layouts are frozen like a C struct:
    • the MessageParserPluginBase member prefix and virtual order,
    • sdk::ObjectRecord, sdk::BuiltinObject, PJ::Expected,
    • every builtin object struct under pj_base/builtin/.
  • A member change in any of them is a MAJOR. Neither PJ_ABI_VERSION nor the abidiff gate (a DataSource canary) detects it.
  • A 1.x release lifts the freeze once the host reads objects through v2 only.
  • The same rule is stated briefly in CLAUDE.md (release rules), docs/builtin_type.md, REQUIREMENTS.md, the parser guide and the three headers.

One thing 1.0 already did

1.0.0 changes two of those layouts: sdk::Log gains category and sdk::DepthImage gains frame_id. A parser built against 0.x that returns either type must be rebuilt for a 1.0 host. I searched pj-official-plugins main and found no parser that returns either type. The changelog says so.

Verification

Pre-commit passes. Nothing was built locally: the diff touches comments and Markdown only, and CI compiles the three headers.

🤖 Generated with Claude Code

…layouts

Four documents and three header comments said SDK 1.0 removes the bridge
through which a host casts a parser context to MessageParserPluginBase*.
PlotJuggler 4 reads objects that way for every parser and never negotiates
pj.parser_functional.v2, so the promise was false.

The bridge is now documented as deprecated but supported through 1.x, and
ARCHITECTURE.md section 0a states the rule that follows from it: the
MessageParserPluginBase prefix, ObjectRecord, BuiltinObject, Expected and
every builtin object struct are frozen layouts, and a member change in any
of them is a MAJOR. A 1.x release lifts the freeze once the host reads
objects through v2 only.

No code changes: comments, docs and the changelog.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@facontidavide
facontidavide merged commit 8595e3d into main Nov 14, 2026
4 checks passed
@facontidavide
facontidavide deleted the docs/parser-bridge-contract branch November 14, 2026 08:31
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