Popcorn > Releases and Release Notes
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:
- Works under
PublishAot=TrueandPublishTrimmed=True. No runtime reflection on the hot path. - Performance: beats legacy v7 reflection by 3–8× on "emit everything" shapes; ~5.8× on selective-fetch ComplexModelList. On nested complex data, v8 emitting everything is faster than raw
System.Text.Json(0.87× time / 0.93× alloc). Full 3-way benchmark report underbenchmarks/results/v2-baseline/. - Custom envelope + exception middleware shipped (
[PopcornEnvelope]+[PopcornPayload]/[PopcornError]/[PopcornSuccess]markers +UsePopcornExceptionHandler). [SubPropertyDefault("[Make,Model]")]attribute (v7's[SubPropertyIncludeByDefault], renamed and generator-backed).- Generator diagnostics JSG003–JSG008 for malformed envelopes and AOT-incompatible polymorphic shapes.
Breaking changes from v7 (abridged — see MigrationV7toV8.md):
- Attribute renames:
[IncludeByDefault]→[Default],[IncludeAlways]→[Always],[InternalOnly]→[Never],[SubPropertyIncludeByDefault]→[SubPropertyDefault]. - Fluent-lambda config surface (
config.Map<T>(),.Translate<T>(...),.Authorize<T>(...),.SetContext(...),.SetInspector(...)) removed entirely. Type discovery moved to[JsonSerializable(typeof(ApiResponse<T>))]on aJsonSerializerContext. Exception wrapping moves toUsePopcornExceptionHandler()+ a[PopcornEnvelope]type. ?include=[...]now matches the wire name (from[JsonPropertyName]orJsonNamingPolicy), not the C# identifier. Client-visible contract.- Dropped features (permanent): sorting, pagination, filtering, authorizers,
SetContext(dict),MapEntityFramework<S,P,Ctx>,BlindHandler,[Translator]lambdas. Each has a cleaner replacement documented in the migration guide.
- Feature Additions:
- Condensed our entire .NET offering into one .NET Standard project
- Enhanced the map ability so a single source type can be mapped to multiple destination types
- Added a default response inspector implementation
- Authorizers added as a configuration option to restrict access to certain objects as specified
- Bug Fixes:
- Enabled the handling of polymorphism in DefaultIncludes
- MapEntityFramework method allows for custom configurations without additional setup
- Maintenance
- Documentation added: Authorizers, Factories in Advanced Projections tutorial, Response Inspectors
- Test additions and added CI to GitHub project
- Feature Additions:
- Query parameter "sort" added to allow the sorting of responses based on a simple comparable property
- Query parameter "sortDirection" added to be used in conjunction with "sort" to specify ascending or descending sort order
- Added Sorting tutorial
- Query parameter "sort" added to allow the sorting of responses based on a simple comparable property
- Maintenance:
- Test additions
- Feature Additions:
- [IncludeByDefault] added as a property option for projections to allow users to set their default return properties in the projection itself.
- Naming of [SubPropertyIncludeByDefault] updated
- Added DefaultIncludes tutorial
- Maintenance:
- Test additions
- Bug Fixes:
- Adding a solution to allow nulls to be passed to an inspector
- Allowing spaces to be passed in an include request, i.e ?include=[property1, property2[subproperty1, subproperty2]]
- Bug Fixes:
- Got reference navigation properties working again.
- Bug Fixes:
- Allowed blind expansion to be accomplished when specifically designated
- Feature Additions:
- Added all initial documentation
+ Project inception!