Skip to content

fix: use extension registry for CLI text parsing#100

Merged
wackywendell merged 2 commits intomainfrom
wendell/cli-bug
Apr 20, 2026
Merged

fix: use extension registry for CLI text parsing#100
wackywendell merged 2 commits intomainfrom
wendell/cli-bug

Conversation

@wackywendell
Copy link
Copy Markdown
Collaborator

Description

The CLI's convert -f text and validate commands didn't pass the ExtensionRegistry to the text parser, so plans containing custom extensions (registered via run_with_extensions) failed to parse from text input.

This PR:

  • Adds parse_with_registry() to lib.rs as the symmetric counterpart to format_with_registry()
  • Fixes Format::read_plan for text input to use the registry-aware parser
  • Refactors run_validate_with_io to reuse Format::read_plan / write_plan instead of duplicating the parse/format logic

Type of Change

  • Bug fix

Testing

  • All existing tests pass (176 unit + 85 integration/doc tests)
  • Pre-commit hooks pass (clippy, fmt)

Checklist

  • Code follows Rust conventions
  • Documentation updated if needed
  • No breaking changes (or breaking changes documented)
  • Pre-commit hooks pass

Related Issues

Closes #95

@wackywendell wackywendell marked this pull request as ready for review April 14, 2026 17:36
@wackywendell wackywendell requested a review from a team as a code owner April 14, 2026 17:36
Copy link
Copy Markdown
Contributor

@benbellick benbellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me. Though I wonder if there is a way to test this. Maybe we could have some dummy protos inside of this repo for testing purposes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI text parser doesn't use extension registry

2 participants