Deepstaging — Roslyn code generation for LanguageExt effects #1541
trbngr
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been building a code generation toolkit on top of LanguageExt for the last year or so and it's at a point worth sharing.
The core idea is simple: everything fans out from a
Runtimecomposed ofEffectsModules.That's it. The generator sees your Runtime, sees what it
[Uses], and generates the capability interfaces, the DI wiring, and OpenTelemetry instrumentation for every effect method. Your handlers work withEff<ScribeRuntime, A>and the compiler enforces that you only touch capabilities you declared.The testing story is where it gets interesting. Drop
[TestRuntime]on a class and you get generated stubs, builders, and in-memory implementations for every capability. No mocking frameworks, no DI containers, no ceremony:Set
INTEGRATION=trueand the same tests run against real Postgres/Redis/whatever via Testcontainers. Same assertions, same test code — just a different runtime configuration.There's a bunch of other stuff built on top:
[DataStore]for persistence with generated CRUD effects,[DispatchModule]for typed CQRS where method overload resolution IS the dispatch (no runtime routing),[TypedId]for strongly-typed IDs,[ConfigProvider]for typed configuration with JSON Schema,[EventQueue]for Channel-backed async workflows. 50+ analyzers catch mistakes at compile time with one-click fixes.Not open source yet but getting close. Docs site and NuGet packages attached below.
📎 deepstaging-site.zip
📎 deepstaging-packages.zip
Beta Was this translation helpful? Give feedback.
All reactions