Skip to content

Add 'cratis render' as a root command - #70

Merged
woksin merged 3 commits into
mainfrom
feat/render-root-command
Aug 14, 2026
Merged

Add 'cratis render' as a root command#70
woksin merged 3 commits into
mainfrom
feat/render-root-command

Conversation

@woksin

@woksin woksin commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Added

woksin added 3 commits August 13, 2026 10:59
Renders a .play file, or every .play file beneath a folder, into a
Cratis application on disk through the Stage renderer. What the
document states but the rendered application cannot express goes to
standard error rather than being dropped; a document the compiler
rejects is not rendered at all.

Does not work: the renderer package carries the Arc and Chronicle
runtime and the template engine (Cratis/Stage#34), which forces three
csproj workarounds here and still leaves the two hosted engines in
conflict - MSBuildLocator requires no NuGet.Frameworks beside the
executable, the template engine requires one. Committed unmerged so the
command survives until that is fixed.
Cratis.Stage.Rendering.Cratis 2.4.0 no longer ships the Arc + Chronicle
runtime or the template engine - scaffolding moved to its own package - so
the three references that existed only to undo that come out:

- Cratis, taken directly in both the CLI and its specs to keep the 28 global
  usings its build assets contribute out of the compilation
- NuGet.Frameworks, excluded from runtime because the template engine brought
  it and MSBuildLocator refuses to start beside a copy of it (MSBL001)

The resolved graph now holds no Cratis meta-package, no Cratis.Arc.*, no
template engine and no NuGet.Frameworks - only the Screenplay, Chronicle and
Stage packages the CLI references itself.
@woksin woksin added the minor New features, non-breaking additions label Aug 14, 2026
@woksin

woksin commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

This branch was written earlier and held back deliberately: consuming the renderer cost three csproj workarounds, and one of them made rendering fail at run time. Stage 2.4.0 (Cratis/Stage#35) removed the cause, so the second commit here is the bump and the deletion of all three.

What the workarounds were, and why they are gone. Cratis.Stage.Rendering.Cratis used to ship the Arc + Chronicle runtime and the template engine. 2.4.0 moves scaffolding into Cratis.Stage.Rendering.Cratis.Scaffolding, which this CLI does not reference.

Workaround Existed because
Cratis taken directly in Cli.csproj, build assets excluded its Cratis.props contributed 28 global usings, making User, AppendedEvent and FailedPartition ambiguous
the same in Cli.Specs.csproj same, reaching the specs transitively
NuGet.Frameworks excluded from runtime the template engine brought it, and MSBuildLocator refuses to start beside a copy (MSBL001)

The resolved graph now holds no Cratis meta-package, no Cratis.Arc.*, no template engine, no NuGet.Frameworks — only the Screenplay, Chronicle and Stage packages the CLI references itself. The silent version regression noted on Stage#34 is gone too: Cratis.Chronicle.* resolves at the pinned 16.30.1 with nothing pulling a different one in behind Arc.

Verification — the command was run, not just built. A green build and green specs are what this branch had while being incapable of rendering anything, so:

cratis render invoicing.play --target <dir>
→ 34 files, 47 not carried, exit 0

The earlier figure was 33 files / 44 drops against a locally packed pre-#35 renderer. The delta is exactly what #35 adds, and it was checked rather than assumed: 1 specification now renders as a CommandScenario spec (when_rejecting_an_invoice_with_no_lines.cs) and 3 are declined with their reasons on stderrRegisteringADraftInvoice and RejectingAnInvoiceWhoseNumberIsAlreadyTaken because a given event names no event source, SendingADraftInvoice because it states read model state.

446 specs against a 436 baseline, Release build zero warnings. main was merged in rather than rebased, so this also carries the Arc.Screenplay 21.14.2 and Chronicle 16.30.1 moves.

Not verified: no rendered application has been booted against a live Chronicle, and no rendered specification executed.

@woksin
woksin merged commit 15661e6 into main Aug 14, 2026
1 check passed
@woksin
woksin deleted the feat/render-root-command branch August 14, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features, non-breaking additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant