You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Schema.Editor can't generate C++: a schema with a cpp code generator fails in the editor though kschema generate succeeds #279
By default SchemaGenerator registers only the C# generator (Schema/Generation/SchemaGenerator.cs:21-25). The C++ generator is available only to a host that calls SchemaGenerator.Register(new CppCodeGenerator(...)), and the only host that does is Schema.Tool/Program.cs:51.
Schema.Editor/Schema.Editor.csproj references only ..\Schema\Schema.csproj, not Schema.Cpp, and nothing in Schema.Editor/ calls Register.
Schema.Editor/CodeGeneratorPanel.cs (ShowLanguageSelector) builds its list from SchemaGenerator.SupportedLanguages, so the only language offered is csharp.
Scenario
Write a schema with a code generator set to "language": "cpp".
Run kschema generate my.schema.json: the headers are written.
Open the same schema in Schema.Editor and press Generate. The editor reports: "No generator is registered for language 'cpp'. Known languages: csharp."
The C++ generator is a first-class part of the repository, with its own project, package and acceptance tests, but the editor can't use it. The editor targets net10.0, which Schema.Cpp already targets, so nothing prevents the reference.
Suggested fix
Reference Schema.Cpp from Schema.Editor and call SchemaGenerator.Register(new CppCodeGenerator(options)) at startup, as Schema.Tool does.
CppGeneratorOptions currently reaches the tool only through --cpp-options <file>. The editor needs a per-generator options-file path, or at least default options. With defaults, unsupported types such as vectors and handles are refused by name, which is already reported cleanly as TargetCannotExpress.
Add a UI test that the language picker lists cpp, and that Generate succeeds for a schema that uses only standard types.
Activity
matt-edmondson commentedon Oct 17, 2026
Triage
CodeGeneratorPanel; Schema.Cpp.Schema.Cppand registerCppCodeGeneratorat editor startup, with default options. A per-generator options path can come later.Generated by Claude Code
Offer C++ generation in the editor