Skip to content

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

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#27
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.

Mirrors PR ZeroAlloc-Net/ZeroAlloc.Mediator#96 (same pattern, just-shipped recipe). Part of the rollout for ZA.Mediator backlog #10.

The test project previously consumed the helper via a <Compile Include> link from the smoke sample; it now references the package directly and the link is removed.

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
  • AOT publish + run of the smoke binary succeeds with the new package

Local verification on this branch:

  • dotnet build Release: clean (0 warnings, 0 errors)
  • dotnet test ZeroAlloc.Authorization.slnx -c Release: 44 tests passed (Authorization.Tests 30, Generator.Tests 11, PackSmoke 3)
  • AOT publish + run prints AOT behavior OK, AOT allocation gate OK, AOT [RequirePolicy] allocation gate OK (exit 0)

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 assembly as internal static class
AllocationGate in namespace ZeroAlloc.TestHelpers.

The test project previously consumed the same helper via
<Compile Include> link from the smoke sample; it now references the
package directly and the link is removed.

Part of the org-wide migration closing AllocationGate-copy-drift across
the ZeroAlloc.* ecosystem (ZA.Mediator backlog #10).
@MarcelRoozekrans
MarcelRoozekrans merged commit e865255 into main May 22, 2026
4 checks passed
@MarcelRoozekrans
MarcelRoozekrans deleted the chore/migrate-to-zeroalloc-test-helpers branch May 22, 2026 14:03
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