Skip to content

chore: NativeAOT / Trim compatibility audit and annotations for all Pulse packages #297

@samtrion

Description

@samtrion

User Story

As a developer publishing a NativeAOT or trimmed application using Pulse, I want Pulse to be fully trim-compatible and NativeAOT-safe, so that I can publish single-file or NativeAOT binaries without trim warnings or runtime failures.


Background

This is the lowest priority item, to be implemented last after all other features are complete. No new features are introduced — this is pure annotation, configuration, and source generator work.


Requirements

  • Enable ILLink trimmer warnings for all Pulse projects; document all [RequiresUnreferencedCode] sites.
  • Add [DynamicallyAccessedMembers] annotations to all Type parameters used for reflection (handler resolution, interceptor pipeline, event dispatcher).
  • Extend the source generator to emit ILLink.Descriptors.xml covering all generated handler registration classes.
  • Add [JsonSerializable] source-generation (System.Text.Json) for all internal Pulse DTOs: Outbox payload, AuditRecord, CommandDeadLetterEntry.
  • Add GitHub Actions CI step: dotnet publish -r linux-x64 -p:PublishAot=true for a test project; fail on any trim warning.

Acceptance Criteria

  • Zero [RequiresUnreferencedCode] warnings in Pulse package builds.
  • Source generator emits ILLink.Descriptors.xml covering all handler types.
  • JsonSerializerContext covers all internal serialized DTOs.
  • CI NativeAOT publish step passes without warnings.

Out of Scope

  • User-defined handler types (the user's application code).

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:choreIndicates some housework that needs to be done.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions