Skip to content

In tests, re-parse converted sources with their new language’s parser - #9241

Merged
greg-at-moderne merged 1 commit into
mainfrom
greg-parser-shaped-converted-language
Oct 19, 2026
Merged

greg-at-moderne merged 1 commit into
mainfrom
greg-parser-shaped-converted-language

Conversation

@greg-at-moderne

@greg-at-moderne greg-at-moderne commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What's changed?

When testing a recipe which changes the type of the whole SourceFile, e.g. JSON to YAML, don't use the old parser for parsing the outcome.

What's your motivation?

After #9229, some of the derived modules recipe tests would fail with errors like:

the text it prints doesn't parse: JsonParsingException: Syntax error in convert.yaml at line 1:0 mismatched input 'unit' ```

Notice the Json vs. `.yaml`

@greg-at-moderne greg-at-moderne self-assigned this Oct 19, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Oct 19, 2026
@greg-at-moderne greg-at-moderne changed the title In tests, don’t re-parse converted sources with the original language's parser In tests, re-parse converted sources with their new language’s parser Oct 19, 2026
@greg-at-moderne
greg-at-moderne marked this pull request as ready for review October 19, 2026 07:28
@greg-at-moderne
greg-at-moderne merged commit dd2b202 into main Oct 19, 2026
2 checks passed
@greg-at-moderne
greg-at-moderne deleted the greg-parser-shaped-converted-language branch October 19, 2026 07:28
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant