Skip to content

chore(deps): migrate to ZeroAlloc.TestHelpers for AllocationGate#16

Merged
MarcelRoozekrans merged 1 commit into
mainfrom
chore/migrate-to-zeroalloc-test-helpers
May 22, 2026
Merged

chore(deps): migrate to ZeroAlloc.TestHelpers for AllocationGate#16
MarcelRoozekrans merged 1 commit into
mainfrom
chore/migrate-to-zeroalloc-test-helpers

Conversation

@MarcelRoozekrans

Copy link
Copy Markdown
Contributor

Summary

Removes the local copy of samples/.../Internal/AllocationGate.cs and replaces it with a PackageReference to the newly-published ZeroAlloc.TestHelpers 1.0.0 package.

Closes the drift: this repo's local copy was the older/smaller version of the helper - missing AssertBudgetValueTask<T>(...) that Mediator and Authorization had. After this migration, the smoke gets the full helper. The smoke doesn't currently invoke the ValueTask overload; the capability is just available now.

Mirrors PR ZeroAlloc-Net/ZeroAlloc.Mediator#96 + ZeroAlloc-Net/ZeroAlloc.Authorization#27. Final consumer in the rollout for ZA.Mediator backlog #10.

Consumer recipe

<PackageReference Include="ZeroAlloc.TestHelpers" Version="1.*">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>contentfiles;build</IncludeAssets>
</PackageReference>

Test plan

  • CI green: build + tests + aot-smoke (+ api-compat if present)
  • AOT publish + run of the smoke binary succeeds with the new package

Local verification (pre-push):

  • Build (Release): clean (1 pre-existing MA0051 warning)
  • Tests: 34/34 passed
  • AOT publish + run (win-x64): exited 0, prints "AOT mapping behavior OK" + "AOT allocation gate OK"

Removes the local samples/.../Internal/AllocationGate.cs and pulls the
helper in via the new ZeroAlloc.TestHelpers package
(ZeroAlloc-Net/ZeroAlloc.TestHelpers, source-only NuGet at
contentFiles/cs/any/ZeroAlloc.TestHelpers/AllocationGate.cs).

This consumer's previous local copy was the older/smaller version of
the helper - missing AssertBudgetValueTask<T>(...) that Mediator and
Authorization had added later. After this migration, the smoke gets
the full helper automatically. The smoke does not currently call the
ValueTask overload; the capability is just available now.

Closes the AllocationGate-copy-drift that motivated the factor-out
(ZA.Mediator backlog #10).
@MarcelRoozekrans
MarcelRoozekrans merged commit f46a8d5 into main May 22, 2026
3 checks passed
@MarcelRoozekrans
MarcelRoozekrans deleted the chore/migrate-to-zeroalloc-test-helpers branch May 22, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant