Semantic Diff

#9157 Dispatch @deriving by name instead of through a registry

2 commits

8e26a9ca6922aaecfe526792eaf3d2f194cdffb9..pr-9157

2874653e3 · cknitt + Claude · Oct 31, 2026, 10:20 UTC

Dispatch @deriving by name instead of through a registry

Ast_derive kept a process-global table of derivers, filled at startup by a side effect in Bs_builtin_ppx, with a single entry (accessors) and an expression_gen field nothing read. dispatch now matches the name directly, so it stays the one place a future deriver would be resolved. The projector exposes its generators as plain functions. New super_errors fixtures pin the unknown-deriver and configuration errors, which are unchanged.

e84079e3b · cknitt + Claude · Nov 01, 2026, 06:43 UTC

Name the deriver in @deriving errors and say what is supported

Why

Review: "lenses is not supported" and "such configuration is not supported" didn't say which attribute was wrong or what to write instead. The messages now follow the removed-deriver ones.

modifiedDiagnostic unknown deriver

@deriving(lenses)type t = {name: string}
diagnostic
Before
After
lenses is not supported@deriving(lenses) is not supported. The only deriver is @deriving(accessors).

modifiedDiagnostic configuration for accessors

@deriving({accessors: true})type t = {name: string}
diagnostic
Before
After
such configuration is not supported@deriving(accessors) takes no configuration.