Skip to content

1.10.0

Choose a tag to compare

@reid-spencer reid-spencer released this 14 Feb 17:19
· 1443 commits to main since this release
4c51c1b

RiddlResult[T] ADT + BAST Fixes

RiddlResult

  • New cross-platform sealed trait RiddlResult[T] with Success[T] and Failure cases
  • Replaces Either[Messages, T] as return type for all RiddlLib methods
  • map, flatMap, toEither, fromEither for interop
  • ast2bast now returns RiddlResult[Array[Byte]] (surfaces errors instead of silent empty array)
  • TypeScript: ParseResult<T> renamed to RiddlResult<T> (deprecated alias kept)

BAST Fixes

  • BAST reader metadata flag handling fix
  • BASTWriter node tracking improvements
  • BinaryFormat header enhancements, new node type tags
  • SharedBASTTest coverage for deserialization edge cases

Migration

Scala: Replace result.isRight/result.isLeft with pattern matching:

RiddlLib.parseString(source) match
  case RiddlResult.Success(root) => // use root
  case RiddlResult.Failure(errors) => // handle errors

Or use result.toEither for backward compat.

TypeScript: Replace ParseResult<T> with RiddlResult<T>. Deprecated alias still works.