Skip to content

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

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#96
MarcelRoozekrans merged 1 commit into
mainfrom
chore/migrate-to-zeroalloc-test-helpers

Conversation

@MarcelRoozekrans

Copy link
Copy Markdown
Collaborator

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.

Part of the rollout for ZA.Mediator backlog item #10 - design and plan landed in #95.

Consumer recipe

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

The source file compiles into AotSmoke + Tests assemblies as internal static class AllocationGate in namespace ZeroAlloc.TestHelpers. No DLL, no runtime payload.

Test plan

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

Local verification (all green):

  • dotnet build samples/ZeroAlloc.Mediator.AotSmoke -c Release -> 0 errors
  • dotnet test tests/ZeroAlloc.Mediator.Authorization.Tests -c Release -> 31/31 passed
  • dotnet publish samples/ZeroAlloc.Mediator.AotSmoke -r win-x64 -c Release -> succeeded
  • Running the AOT exe prints AOT smoke: PASS

Generated with Claude Code

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).

Consumer recipe per the package's README: PrivateAssets="all" +
IncludeAssets="contentfiles;build" on the PackageReference. The source
file compiles into the AotSmoke + Tests assemblies as internal static
class AllocationGate in namespace ZeroAlloc.TestHelpers.

Part of the org-wide migration closing AllocationGate-copy-drift across
the ZeroAlloc.* ecosystem (ZA.Mediator backlog #10).
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