Skip to content

v2.0.0

Choose a tag to compare

@marcel-release-bot marcel-release-bot released this 22 Nov 09:56
318120f

2.0.0 (2026-11-22)

⚠ BREAKING CHANGES

  • ZeroAlloc.Pipeline no longer ships a netstandard2.0 asset, so a netstandard2.0 consumer must move to net10.0 or later, and ZeroAlloc.Pipeline.Generators no longer depends on ZeroAlloc.Pipeline, so a project that relied on getting the contracts through it must reference ZeroAlloc.Pipeline itself and a generator project must stop shipping ZeroAlloc.Pipeline.dll. See the Behaviour change section of the PR for migration steps.
  • the ZeroAlloc.Pipeline net8.0 asset is no longer shipped; PipelineShape.EmitStaticLambdas, PipelineEmitter.EmitCachedChain and PipelineCachedChain are removed and every emitted lambda is static, so a chain body that reads instance state must take it through PipelineShape.State. See the Behaviour change section of the release for the migration steps.

Features

  • add a FindMissingHandleMethod overload that checks behaviors against a PipelineShape (bac8d4b)
  • drop the unused ZeroAlloc.Pipeline reference from Pipeline.Generators and the netstandard2.0 target (08386ef)
  • remove EmitStaticLambdas, EmitCachedChain and PipelineCachedChain in favour of PipelineShape.State (bac8d4b)
  • target net10.0 and net11.0 in ZeroAlloc.Pipeline, drop net8.0 (bac8d4b)
  • thread pipeline state through next so every emitted lambda is static (bac8d4b)

Behaviour changes

From #189:

  • net8.0 asset dropped from ZeroAlloc.Pipeline. A net8.0 or net9.0 project now resolves the netstandard2.0 asset. Move to net10.0 or later to get the net build. .NET 8 and .NET 9 are out of support.
  • PipelineShape.EmitStaticLambdas removed. Every lambda the emitter writes is now static. If you set EmitStaticLambdas = false so that the innermost body could read instance fields, pass that state instead, for example State = new PipelineState { TypeName = "global::System.IServiceProvider", Argument = "_services" }. Read it in the body as s{depth}, and have your behaviors take TState as their last type parameter and state as their second parameter, passing it on to next. A body that still reads this fails to compile with CS8821. If you set EmitStaticLambdas = true, delete the assignment; that is now the only behaviour.
  • PipelineEmitter.EmitCachedChain and PipelineCachedChain removed. Replace EmitCachedChain(behaviors, shape, nextDelegateType, prefix) with EmitChain(behaviors, shape with { State = ... }), and delete the emitted cache-field declarations. The state chain allocates nothing per call and needs no fields.

Closes #121

From #192:

  • ZeroAlloc.Pipeline has no netstandard2.0 asset. Migration: a project that consumed it from netstandard2.0 must move to net10.0 or later, or stay on 1.x. A generator or analyzer project must not reference ZeroAlloc.Pipeline; it has no use for it.
  • ZeroAlloc.Pipeline.Generators no longer depends on ZeroAlloc.Pipeline. Migration: a project that got the contracts transitively through the Generators package adds ZeroAlloc.Pipeline itself. A generator project stops copying and shipping ZeroAlloc.Pipeline.dll in analyzers/dotnet/cs: remove the pack item and any copy step for it, and keep shipping ZeroAlloc.Pipeline.Generators.dll.

Closes #190