Deepstaging — Roslyn code generation for LanguageExt effects #1541
Replies: 2 comments 3 replies
-
|
Very interesting! I don't know when I'll have time to look into this deeply, but it seems to address a very important need to drive language-ext adoption. Maybe too premature to compare to Rails for Ruby adoption, but that general idea. |
Beta Was this translation helpful? Give feedback.
-
|
Haha, I wasn't even referring to that pattern as negative thing, but maybe I'm just like this guy https://www.youtube.com/watch?v=Uo3cL4nrGOk in regards to hybrid OO-FP C#, describing the mess and then saying "I love it". Thanks for prioritizing SQLite! I think time on my end is the main obstacle to getting up and running, so no rush. |
Beta Was this translation helpful? Give feedback.
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.
Full Docs: https://deepstaging.github.io/
Beta Was this translation helpful? Give feedback.
All reactions