Partial-response JSON for ASP.NET Core: API clients ask for exactly the fields they need. v8 is a Roslyn source generator for System.Text.Json and Native AOT.
This project is maintained by Skyward App Company
<Version> in both dotnet/Popcorn.Shared/Popcorn.Shared.csproj and
dotnet/Popcorn.SourceGenerator/Popcorn.SourceGenerator.csproj to the new version, and add
the release notes below, in a pull request to master. The release workflow does not edit
the csproj files.release/vX.Y.Z (or release/vX.Y.Z-suffix for a
prerelease) and push the tag.nuget-release environment before pushing to NuGet and creating the GitHub
release. Versions with a suffix are marked as GitHub prereleases.First public preview of v8 — Popcorn reimplemented as a Roslyn source generator for Native AOT and IL trimming compatibility. See MigrationV7toV8.md for the full migration story.
New packages (side-by-side installable with v7):
Skyward.Api.Popcorn.SourceGen — Roslyn analyzer, developmentDependency.Skyward.Api.Popcorn.SourceGen.Shared — runtime attributes, envelopes (ApiResponse<T> / Pop<T> / ApiError), exception middleware (UsePopcornExceptionHandler), DI helpers.Highlights:
PublishAot=True and PublishTrimmed=True. No runtime reflection on the hot path.System.Text.Json (0.87× time / 0.93× alloc). Full 3-way benchmark report under benchmarks/results/v2-baseline/.[PopcornEnvelope] + [PopcornPayload] / [PopcornError] / [PopcornSuccess] markers + UsePopcornExceptionHandler).[SubPropertyDefault("[Make,Model]")] attribute (v7’s [SubPropertyIncludeByDefault], renamed and generator-backed).Breaking changes from v7 (abridged — see MigrationV7toV8.md):
[IncludeByDefault] → [Default], [IncludeAlways] → [Always], [InternalOnly] → [Never], [SubPropertyIncludeByDefault] → [SubPropertyDefault].config.Map<T>(), .Translate<T>(...), .Authorize<T>(...), .SetContext(...), .SetInspector(...)) removed entirely. Type discovery moved to [JsonSerializable(typeof(ApiResponse<T>))] on a JsonSerializerContext. Exception wrapping moves to UsePopcornExceptionHandler() + a [PopcornEnvelope] type.?include=[...] now matches the wire name (from [JsonPropertyName] or JsonNamingPolicy), not the C# identifier. Client-visible contract.SetContext(dict), MapEntityFramework<S,P,Ctx>, BlindHandler, [Translator] lambdas. Each has a cleaner replacement documented in the migration guide.+ Project inception!