Skip to content

Release 1.9.0: Add RiddlResult[T] ADT#722

Merged
reid-spencer merged 5 commits into
mainfrom
development
Feb 14, 2026
Merged

Release 1.9.0: Add RiddlResult[T] ADT#722
reid-spencer merged 5 commits into
mainfrom
development

Conversation

@reid-spencer
Copy link
Copy Markdown
Contributor

Summary

  • Add cross-platform RiddlResult[T] sealed trait replacing Either[Messages, T] returns in RiddlLib
  • ast2bast now returns RiddlResult[Array[Byte]] instead of silent empty array on failure
  • TypeScript: ParseResult<T> renamed to RiddlResult<T> (deprecated alias kept)

Test plan

  • sbt riddlLib/test — 13/13 JVM tests pass
  • sbt riddlLibJS/test — 11/11 JS tests pass
  • All pattern matches updated to RiddlResult.Success/Failure

🤖 Generated with Claude Code

respencer-ncl and others added 5 commits February 13, 2026 10:16
…rning

These are semantic correctness issues (handler not producing expected
output), not structurally missing elements. A command handler that
doesn't send an event or a query handler that doesn't send a result
is doing the wrong thing, not missing content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d test

Move BastifyCommand and UnbastifyCommand from commands/jvm to
commands/shared so they compile for both JVM and Native platforms.
Register both commands in the Native CommandLoader and shared
Commands.loadCommandNamed. Add round-trip UnbastifyCommandTest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds cross-platform bast2FlatAST(bytes) to RiddlLib trait,
RiddlAPI JS facade (Int8Array input), TypeScript declaration,
and a shared round-trip test. Enables ossum.ai Playground to
load pre-built BAST files and get a flattened Root for display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tput

- Centralize metadata flag save/restore in readNode() instead of
  each individual read*Node() method
- Add Epic/UseCase subtype byte to disambiguate during read
- Use RepositorySchemaKind.fromOrdinal() instead of manual match
- Simplify unbastify to emit single flattened .riddl file
- Add RiddlModelsRoundTripTest for BAST round-trip validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces a cross-platform sealed trait RiddlResult[T] with
Success[T] and Failure cases. All RiddlLib methods that returned
Either[Messages, T] now return RiddlResult[T]. ast2bast changed
from Array[Byte] to RiddlResult[Array[Byte]] to surface errors.

TypeScript: ParseResult<T> renamed to RiddlResult<T> with
deprecated alias for migration. RiddlResult provides map,
flatMap, toEither for Scala interop and fromEither for bridging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@reid-spencer reid-spencer merged commit 67a3f1f into main Feb 14, 2026
6 of 12 checks passed
@reid-spencer reid-spencer deleted the development branch February 14, 2026 17:07
@sonarqubecloud
Copy link
Copy Markdown

scala-steward pushed a commit to scala-steward/riddl-1 that referenced this pull request Feb 20, 2026
Release 1.9.0: Add RiddlResult[T] ADT
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.

3 participants