Skip to content

Emit scenario generated sources to obj for inspection - #233

Merged
kzu merged 1 commit into
mainfrom
dev/emit-scenario-sources
Sep 29, 2026
Merged

kzu merged 1 commit into
mainfrom
dev/emit-scenario-sources

Conversation

@kzu

@kzu kzu commented Sep 29, 2026

Copy link
Copy Markdown
Member

Roslyn's GeneratorDriver never writes generated sources to disk (that's done by csc via /generatedfilesout), so there was no way to inspect what StuntGenerator produced for each scenario.

When the test project has EmitCompilerGeneratedFiles=true (already set in Stunts.UnitTests.csproj and exposed as ThisAssembly.Project.EmitCompilerGeneratedFiles), each scenario run now writes its generated sources to obj/<Configuration>/<TargetFramework>/scenarios/<Scenario>/<HintName>. The folder is cleared first so stale stunts don't linger.

Output goes to a scenarios sibling rather than under generated, since the scenario and manual stunt tests recursively collect ThisAssembly.*.cs sources from there.

@kzu kzu added the techdebt Technical debt label Sep 29, 2026
@kzu
kzu enabled auto-merge (rebase) September 29, 2026 03:03
@kzu
kzu merged commit 0292223 into main Sep 29, 2026
6 checks passed
@kzu
kzu deleted the dev/emit-scenario-sources branch September 29, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

techdebt Technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant