Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 2.23 KB

File metadata and controls

58 lines (45 loc) · 2.23 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.1-alpha - 2024-12-13

Changed

  • 🎯 Improved NuGet package visibility - Only main package visible in search
  • Marked AnAspect.OneOf.Attributes and AnAspect.OneOf.SourceGenerator as internal dependencies
  • Users now only need to install AnAspect.OneOf (dependencies auto-resolved)
  • Updated installation documentation for simpler setup

Fixed

  • Package descriptions clarify which package to install
  • Dependency resolution now works automatically

0.1.0-alpha - 2024-12-13

⚠️ Experimental Release

This is an experimental alpha release. APIs and behavior are subject to change.

Added

  • Initial implementation of OneOf<T1, T2> with IL weaving
  • Source generator for compile-time OneOf type generation
  • Fody module weaver for IL transformation
  • Support for:
    • From(T) - Create OneOf from value
    • IsT1, IsT2 - Type checking (weaved to is operator)
    • AsT1(), AsT2() - Value extraction (weaved to direct cast)
    • Implicit conversions from T1/T2
  • Memory benchmarks showing 30-57% memory reduction
  • Unit tests with 100% pass rate
  • Sample application demonstrating usage
  • Comprehensive README and documentation

Known Limitations

  • Only OneOf<T1, T2> supported (no T3+)
  • TryGet methods not yet weaved (fallback to runtime implementation)
  • Only local variables retargeted to object (not fields/parameters/returns)
  • Debugger shows object instead of OneOf<T1, T2> after weaving
  • No custom serialization support
  • No Roslyn analyzers yet

Performance

  • Reference types: ~31% memory reduction vs traditional OneOf
  • Value types: ~57% memory reduction vs traditional OneOf
  • Zero-cost type checking (direct is operator)
  • Zero-cost value extraction (direct cast)