Skip to content

Upgrade to LanguageExt v5 (beta)#54

Merged
fw2568 merged 3 commits intov5-betafrom
feature/languageext-v5-upgrade
Feb 17, 2026
Merged

Upgrade to LanguageExt v5 (beta)#54
fw2568 merged 3 commits intov5-betafrom
feature/languageext-v5-upgrade

Conversation

@fw2568
Copy link
Copy Markdown
Contributor

@fw2568 fw2568 commented Feb 17, 2026

Target branch: v5-beta (seperated until LanguageExt v5 is officially released)

Summary

Upgrades Dbosoft.Functional from LanguageExt v4 (4.4.2) to v5 (5.0.0-beta-77), including a comprehensive compatibility shim layer to ease migration for downstream consumers. This is a major version bump with significant breaking changes in LanguageExt itself.

Key Changes

LanguageExt v5 Upgrade

  • LanguageExt.Core: 4.4.25.0.0-beta-77
  • Target Framework: netstandard2.0net10.0 (required by LanguageExt v5)
  • C# Language Version: bumped to C# 14 (for extension operators/members)

Compatibility Shim Layer (src/Dbosoft.Functional/Compat/)

A full set of backward-compatible shims that allow downstream consumers (e.g. YaNco) to migrate incrementally:

Shim Purpose
EitherAsync<L,R> Wraps Task<Either<L,R>> — replaces removed EitherAsync
Aff<R> / Aff<RT,R> Wraps Eff<R> / Eff<RT,R> — replaces removed Aff
TryAsync<A> Wraps Func<Task<Fin<A>>> — replaces removed TryAsync
NewType<NEWTYPE,A,PRED,ORD> Record-based reimplementation of removed NewType
ClassInstances Shims for OrdStringOrdinalIgnoreCase and related
TypeClasses Shims for Ord<A>, Eq<A> traits
CompatPrelude Bare TryAsync(...), RightAsync(...), LeftAsync(...) calls
CompatExtensions IEnumerable.Map(), Task<Either>.MapAsync(), Option.Flatten(), TraverseParallel, etc.

New Packages / Projects

  • Dbosoft.Functional.JsonSystem.Text.Json converter for LanguageExt NewType (new project)
  • AwesomeAssertions.LanguageExt — Test assertion extensions for Either, Option, Fin, Validation (replaces FluentAssertions.LanguageExt which is v4-only)

Existing Code Adaptations

  • EitherExtensions — updated for v5 type changes
  • AffExtensions — adapted for Aff→Eff merge
  • UseExtensions — adapted for removed EitherAsync overloads
  • ValidatingNewType — redesigned for v5 record-based NewType
  • ErrorExtensions — verified compatible (Error changed from struct to abstract record)
  • Validation extensions use CombineAll() instead of | operator (semantics changed in v5)

Migration Guide

A detailed migration guide is included in MIGRATION-v5.md documenting all 33 breaking changes encountered and their resolutions.

For downstream consumers

  1. Add using Dbosoft.Functional.Compat; to continue using EitherAsync, Aff, TryAsync, NewType
  2. Add using static LanguageExt.CompatPrelude; for bare prelude calls (TryAsync(...), etc.)
  3. Use named parameters for Match() calls — parameter order reversed in v5
  4. Replace Aff with Eff in new code (shims provide bridge for existing code)
  5. Replace .Traverse() / .Sequence() on IEnumerable<Either> with imperative alternatives

Why Parked

LanguageExt v5 is still in beta (5.0.0-beta-77). This branch is parked as v5-beta until:

  1. LanguageExt v5 reaches a stable release
  2. Any late-breaking API changes in LanguageExt are absorbed

Once LanguageExt v5 is released, this branch can be rebased onto master and finalized.

@fw2568 fw2568 merged commit 6dfe3f7 into v5-beta Feb 17, 2026
1 check passed
@fw2568 fw2568 deleted the feature/languageext-v5-upgrade branch February 17, 2026 18:11
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.

1 participant