Alejandro Serrano.Mena
02/07/2025, 7:50 AMphldavies
02/07/2025, 11:14 AMOutgoingContent
I believe you've already sidestepped any handling by the ContentNegotiation
plugin.
We've instead introduced something like
data class RawResponse<T>(val payload: T, val statusCode: HttpStatusCode, val typeInfo: TypeInfo)
for our RoutingContext.respondOrRaise(f: Raise<RawResponse>.() -> T)
DSL and provided some additional reified helpers to be able to raise(HttpStatusCode)
or raise(HttpStatusCode, payload)
to effectively replace using call.respond
by making it terminalAlejandro Serrano.Mena
02/07/2025, 11:19 AMphldavies
02/07/2025, 11:37 AMAlejandro Serrano.Mena
02/07/2025, 11:38 AMCLOVIS
02/10/2025, 10:56 AMAlejandro Serrano.Mena
02/10/2025, 11:38 AMOutcome
and your "in progress values" in the docs pointing people to those, if you don't mind
about caching, would you consider making your library implement MemoizationCache, so it's readily available for memoized recursive functions?
personally, I think type-safe Ktor is a bit outside of what Arrow aims to offer; as opposed to the current modules, it's not just an integration, but a completely different way to encode your routesCLOVIS
02/10/2025, 9:05 PMcould we maybe link them in our More libraries section?Feel free!
a page for QuiverI'd love to. I'm not familiar enough with Quiver to write it myself though, but from I read a while ago, the approaches are quite different. My main objective was modeling progress reports, where one function can report how much work left there is, to another. Bundling this into an Either-like type was a logical consequence to get theand your "in progress values" in the docsOutcome
Raise
DSL.
would you consider making your library implement MemoizationCacheThat's a good idea! I created an issue to remember this, but it probably won't be too soon.
I think type-safe Ktor is a bit outside of what Arrow aims to offer; as opposed to the current modules, it's not just an integration, but a completely different way to encode your routesCompletely agree. I mentioned it because it is built to integrate with
Raise
, but I see it more as part of an "Arrow extended universe" rather than a "Ktor integration for Arrow", which I think Simon was working on.phldavies
02/10/2025, 11:34 PMRoutingContext.respondOrRaise
function is similar in approach to how we've been integrating it internally, such that a response is always generated from a handler, and call.respondXxx
is discouraged.CLOVIS
02/11/2025, 8:07 AMsimon.vergauwen
02/11/2025, 12:29 PM