Repository navigation
0.8.0
Changed
Orsak and Orsak.AspNetCore target net8.0 and net10.0. net6.0 is no longer supported, so ITimeProvider, Time, CancellationSource, CancellationScope, Orsak.Resilience and the worker count metric are available on every target. Microsoft.Extensions.*.Abstractions dependencies now start at 8.0.0. 0.7.x is the last release supporting net6.0
Added
CancellationProvider: fromSource provides a source the caller owns, and create a new one, disposed with the provider
Time.delay, which waits on the environment's clock, and ends early when the environment's cancellation source is cancelled
Log: effects that log message templates with the environment's ILogger, e.g. Log.Information("Imported {Count} rows", count)
CancellationScope: a CancellationTokenSource linked to a token, begun and disposed around an effect, so each source lives exactly as long as the effects using it. Cancellation.within runs an effect in one, nested in the current scope if there is one, and Cancellation.timeout cancels it after a duration, stopping the effect, unlike Effect.timeout. cancellableEff is a computation expression whose effects run in one
Orsak.Myriad: an environment may grow into a CancellationScope by adding an ICancellationProvider, and an environment providing an ICancellationProvider begins its scopes nested in its source, with CancellationScope.NestedIn, so a scope begun in a scope is cancelled with it
Orsak.AspNetCore: endpoints carry EffectType metadata, the type of the effect their handler creates, also for a handler that is a lambda
Orsak.AspNetCore: a runner implementing IDescribeResponses describes the responses of each endpoint from the type of its effect, as ResponseDescription metadata, which is an IProducesResponseTypeMetadata for ApiExplorer and OpenAPI generators
Orsak.AspNetCore.OpenApi (.NET 10): options.AddEffectEndpoints() adds the endpoints mapped with MapEffectEndpoints to Microsoft.AspNetCore.OpenApi's documents, described from their routes, handlers, XML docs and metadata, explicit metadata first
Orsak.AspNetCore.OpenApi: options.AddFSharpSchemas() describes options, value options, lists, sets and maps as System.Text.Json writes them: an option is its value or null and not required, and a list, set or map is never null
Fixed
Effects written in a quotation, such as a route handler lambda or a scaling job's work, can use let!, return!, for, while and Effect.Create: each overload of the builders has a compiled name of its own, so deserializing the quotation can bind it
Removed
Orsak.AspNetCore: scalingJob2, a prototype, is internal again
What's Changed
- Base effects by @JohSand in #63
- Let effects written in a quotation bind the builder overloads by @JohSand in #65
- Describe effect endpoints in OpenAPI documents, with Orsak.AspNetCore.OpenApi by @JohSand in #64
- Drop net6 by @JohSand in #66
- Trusted publishing by @JohSand in #67
Full Changelog: 0.7.0...0.8.0