You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build: gate the Native AOT smoke test in CI with a real dotnet publish -r #2230
Split out of #1389 (which is being closed as substantially delivered). src/Refit.NativeAotSmoke is part of Refit.slnx, so CI builds it - and because it promotes the trim/AOT analyzer codes to errors (WarningsAsErrors ...IL2026;IL2055;IL3050;..., PublishAot=true, TrimMode=full), a build catches analyzer-level IL warnings. But a plain dotnet build/dotnet test does not invoke the Native AOT compiler (ILC); only dotnet publish -r <rid> does. So the end-to-end ILC guarantee is not demonstrably gated in CI.
Confirmed locally: dotnet publish src/Refit.NativeAotSmoke -c Release -r linux-x64 produces a clean stripped native binary (0 IL warnings) that runs and prints the smoke pass. This just needs to run in CI to be regression-proof.
Proposal
Verify whether the reusable CI workflow (reactiveui/actions-common/.github/workflows/workflow-common-setup-and-build.yml) already runs a Native AOT publish of the smoke project; if not, add an explicit dotnet publish src/Refit.NativeAotSmoke -c Release -r <rid> step to .github/workflows/ci-build.yml and fail the job on IL warnings/errors.
Optional: extend the smoke coverage to the AddRefitGeneratedClient / IHttpClientFactory DI registration path (the smoke currently uses RestService.ForGenerated<T> directly), so the DI path is also under ILC.
Considerations
Runner RID selection (linux-x64 at minimum; ideally the matrix already in use).
Type-safe REST API clients for .NET, generated from annotated interfaces with build-time source generation, direct request construction, System.Text.Json defaults, and support for trimming and AOT.
Activity
glennawatson commentedon Jul 15, 2026
This is addressed in the Refit 14 beta, now available on NuGet: https://www.nuget.org/packages/Refit/14.0.0-beta.1
Please give it a try - feedback ahead of the stable 14.0.0 release is very welcome.
github-actions commentedon Jul 30, 2026
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.