Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
4.4.2→5.0.0-beta-77netstandard2.0→net10.0(required by LanguageExt v5)Compatibility Shim Layer (
src/Dbosoft.Functional/Compat/)A full set of backward-compatible shims that allow downstream consumers (e.g. YaNco) to migrate incrementally:
EitherAsync<L,R>Task<Either<L,R>>— replaces removedEitherAsyncAff<R>/Aff<RT,R>Eff<R>/Eff<RT,R>— replaces removedAffTryAsync<A>Func<Task<Fin<A>>>— replaces removedTryAsyncNewType<NEWTYPE,A,PRED,ORD>NewTypeClassInstancesOrdStringOrdinalIgnoreCaseand relatedTypeClassesOrd<A>,Eq<A>traitsCompatPreludeTryAsync(...),RightAsync(...),LeftAsync(...)callsCompatExtensionsIEnumerable.Map(),Task<Either>.MapAsync(),Option.Flatten(),TraverseParallel, etc.New Packages / Projects
Dbosoft.Functional.Json—System.Text.Jsonconverter for LanguageExtNewType(new project)AwesomeAssertions.LanguageExt— Test assertion extensions forEither,Option,Fin,Validation(replaces FluentAssertions.LanguageExt which is v4-only)Existing Code Adaptations
EitherExtensions— updated for v5 type changesAffExtensions— adapted forAff→EffmergeUseExtensions— adapted for removedEitherAsyncoverloadsValidatingNewType— redesigned for v5 record-basedNewTypeErrorExtensions— verified compatible (Error changed from struct to abstract record)CombineAll()instead of|operator (semantics changed in v5)Migration Guide
A detailed migration guide is included in
MIGRATION-v5.mddocumenting all 33 breaking changes encountered and their resolutions.For downstream consumers
using Dbosoft.Functional.Compat;to continue usingEitherAsync,Aff,TryAsync,NewTypeusing static LanguageExt.CompatPrelude;for bare prelude calls (TryAsync(...), etc.)Match()calls — parameter order reversed in v5AffwithEffin new code (shims provide bridge for existing code).Traverse()/.Sequence()onIEnumerable<Either>with imperative alternativesWhy Parked
LanguageExt v5 is still in beta (
5.0.0-beta-77). This branch is parked asv5-betauntil:Once LanguageExt v5 is released, this branch can be rebased onto master and finalized.