Skip to content

Latest commit

 

History

History
126 lines (89 loc) · 3.19 KB

File metadata and controls

126 lines (89 loc) · 3.19 KB

Release Notes - AnAspect.OneOf v0.1.1-alpha

Release Date: 2024-12-13
Type: Patch Release (Experimental Alpha)


🎯 What's New in v0.1.1-alpha

Improved Package Structure

The main improvement in this release is simplified installation:

Before (v0.1.0-alpha):

<PackageReference Include="AnAspect.OneOf" Version="0.1.0-alpha" />
<PackageReference Include="AnAspect.OneOf.SourceGenerator" Version="0.1.0-alpha" />
<PackageReference Include="AnAspect.OneOf.Attributes" Version="0.1.0-alpha" />

Now (v0.1.1-alpha):

<PackageReference Include="AnAspect.OneOf" Version="0.1.1-alpha" />
<!-- Other packages auto-installed as dependencies! -->

Changes

  • 🔒 Hidden dependency packages - Only main package visible in NuGet search
  • 📦 Automatic dependency resolution - SourceGenerator and Attributes install automatically
  • 📝 Updated documentation - Clearer installation instructions
  • Better package descriptions - Users know which package to install

📦 Installation

Simple - Just install the main package:

<ItemGroup>
  <PackageReference Include="Fody" Version="6.8.0" PrivateAssets="all" />
  <PackageReference Include="AnAspect.OneOf" Version="0.1.1-alpha" />
</ItemGroup>

Add FodyWeavers.xml:

<?xml version="1.0" encoding="utf-8"?>
<Weavers>
</Weavers>

That's it! The source generator and attributes are included automatically.


⚠️ Experimental Alpha

This is still an experimental alpha release. See EXPERIMENTAL-WARNING.md for important limitations.

What Works

  • ✅ OneOf<T1, T2> with From/Is/As patterns
  • ✅ 30-57% memory reduction
  • ✅ IL weaving via Fody
  • ✅ Full type safety at compile time

Known Limitations

  • Only OneOf<T1, T2> supported (no T3, T4, etc.)
  • TryGet methods not optimized
  • Only local variables optimized (not fields/parameters)

📊 Performance

Same performance as v0.1.0-alpha:

  • 30.9% memory reduction for reference types
  • 57.1% memory reduction for value types
  • Zero-cost type checking (direct is operator)

🔄 Migration from v0.1.0-alpha

If you're using v0.1.0-alpha:

  1. Update version in your .csproj:

    <PackageReference Include="AnAspect.OneOf" Version="0.1.1-alpha" />
  2. Remove explicit references to SourceGenerator and Attributes:

    <!-- Remove these - they're auto-included now -->
    <!-- <PackageReference Include="AnAspect.OneOf.SourceGenerator" Version="0.1.0-alpha" /> -->
    <!-- <PackageReference Include="AnAspect.OneOf.Attributes" Version="0.1.0-alpha" /> -->
  3. Restore packages:

    dotnet restore

No code changes required - this is a packaging improvement only.


📚 Resources


🙏 Feedback

This is an experimental project. Your feedback is valuable!


License: MIT
Author: Pouria7