Skip to content

feat: AOT/trimming support for Results and MinimalApi#61

Merged
OliverVea merged 2 commits into
masterfrom
feat/aot-trimming-support
Mar 28, 2026
Merged

feat: AOT/trimming support for Results and MinimalApi#61
OliverVea merged 2 commits into
masterfrom
feat/aot-trimming-support

Conversation

@OliverVea
Copy link
Copy Markdown
Owner

Summary

  • ResultProblem: Added [JsonConstructor] for deserialization, [JsonIgnore] on Exception/OriginInformation/Args/Message, and FormattedMessage property for clean serialized output. Fixes IL2026 trimming warnings and noisy API surface.
  • IResultType interface: New interface implemented by both Result and Result<T> enabling reflection-free type checking.
  • MinimalApi filter: Replaced MakeGenericMethod reflection with IResultType interface check, fixing IL3053 AOT warnings.
  • IsAotCompatible: Enabled on both Olve.Results and Olve.MinimalApi projects.

Closes #59, closes #60

Test plan

  • Full solution builds with zero warnings (TreatWarningsAsErrors)
  • All 435 tests pass

🤖 Generated with Claude Code

Closes #59, closes #60

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
/// Gets the exception that caused the problem, if any.
/// </summary>
[JsonIgnore]
public Exception? Exception { get; }
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that we just throw away the exception. We should make a public string ExceptionSummary => ... property and take that in in our json ctor.

…ripping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@OliverVea OliverVea merged commit dd8b9d2 into master Mar 28, 2026
12 checks passed
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.

AOT compatibility and request delegate generator conflict in Olve.MinimalApi AOT/trimming and serialization support for Olve.Results

1 participant