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
Generated C# is never compiled in tests and generated JavaScript is barely syntax-checked, so C# compile bugs slip through #162
Generated output is checked unevenly across targets:
C, C++, Rust and Go are compiled (*GeneratedSourceCompilesTests.cs, using CompiledExemplar.cs).
Python is imported (PythonGeneratedSourceImportsTests.cs).
JavaScript gets one node --check call, in JavaScriptGeneratorTests.CompleteImportItem_IsPassedThroughAndParses (~L43-64), which only covers an import line.
C# output is never compiled. Nothing in Coder.Test or Directory.Packages.props references Microsoft.CodeAnalysis.
Why it matters
The open C# compile bugs (#110, #126, #127, #155) are all things a compile step over the existing exemplar would have caught. The same class of regression in C# or JS reaches users unnoticed, while the four compiled targets catch it in CI.
Acceptance criteria
Add a CSharpGeneratedSourceCompilesTests that compiles the C# output of CompiledExemplar (and the shape fixtures the other compile tests use) with CSharpCompilation and asserts zero error diagnostics.
Run the JavaScript output of the same exemplar through node --check (as an .mjs module, skipping when node isn't available, as the other toolchain tests do).
Known failures can be marked expected, with links to their open issues, so the suite lands green and tightens as those issues close.
This also finishes the intent of implementation-plan Task 3.4 ("verify generated code compiles") for the targets added after it.
Next step: Add Microsoft.CodeAnalysis.CSharp to the test project and write CSharpGeneratedSourceCompilesTests against CompiledExemplar, with the known failures marked expected and linked to their issues. Add node --check over the JS output as an .mjs module.
Activity
matt-edmondson commentedon Oct 5, 2026
Triage
const, which fails to compile with CS0133 #110, C#: member operators lose their implicit operand, so binary+silently becomes unary+and unary/conversion operators fail with CS1019 #126, C#: modifiers are emitted where C# forbids them:readonlyon class/interface members (CS0106),public ~T()(CS0106), abstract member in a non-abstract class (CS0513) #127, C#: fields and functions in a NamespaceDeclaration are written directly into the namespace, so the output fails with CS0116 (CS0106 at file scope) #155) reached users. A Roslyn compile step would stop that class of regression.Coder.Testtoolchain tests (alongsideCompiledExemplarand the*GeneratedSourceCompilesTests).const, which fails to compile with CS0133 #110, C#: member operators lose their implicit operand, so binary+silently becomes unary+and unary/conversion operators fail with CS1019 #126, C#: modifiers are emitted where C# forbids them:readonlyon class/interface members (CS0106),public ~T()(CS0106), abstract member in a non-abstract class (CS0513) #127 and C#: fields and functions in a NamespaceDeclaration are written directly into the namespace, so the output fails with CS0116 (CS0106 at file scope) #155, and finishes implementation-plan Task 3.4.Microsoft.CodeAnalysis.CSharpto the test project and writeCSharpGeneratedSourceCompilesTestsagainstCompiledExemplar, with the known failures marked expected and linked to their issues. Addnode --checkover the JS output as an.mjsmodule.Generated by Claude Code