Skip to content

JavaScript: fail fast if no codec for Json.Document#7359

Merged
greg-at-moderne merged 1 commit intomainfrom
greg-js-rpc-fail-fast
Apr 14, 2026
Merged

JavaScript: fail fast if no codec for Json.Document#7359
greg-at-moderne merged 1 commit intomainfrom
greg-js-rpc-fail-fast

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

@greg-at-moderne greg-at-moderne commented Apr 13, 2026

What's changed?

A safety mechanism for JavaScript RPC.
Explicitly fail to start the JavaSciptRewriteRpc if the Java side doesn't have a codec for JSON.

What's your motivation?

This has affected Moderne CLI around version 4.1.3, leading to weird and hard-to-diagnose problems running JS recipes. The errors included:

 Error: Unknown state type END_OF_OBJECT

With this safety mechanism, it'd still fail, but at least explicitly with clear indication of what's wrong.

@greg-at-moderne greg-at-moderne self-assigned this Apr 13, 2026
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Apr 13, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review April 14, 2026 08:49
@greg-at-moderne greg-at-moderne merged commit 11fc146 into main Apr 14, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-js-rpc-fail-fast branch April 14, 2026 08:49
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant