Skip to content

Propagate VCD data parse errors#7

Merged
toddstrader merged 2 commits into
hudson-trading:mainfrom
raptor1820:fix-vcd-data-parse-errors
Jun 9, 2026
Merged

Propagate VCD data parse errors#7
toddstrader merged 2 commits into
hudson-trading:mainfrom
raptor1820:fix-vcd-data-parse-errors

Conversation

@raptor1820

Copy link
Copy Markdown
Contributor

Summary

  • Make next_vcd_change return an io::Result so VCD parser errors in the data section are surfaced instead of being treated like EOF.
  • Propagate read errors through wavecat and wavediff, including threaded multi-reader paths.
  • Add a malformed VCD fixture plus CLI tests for wavecat and wavediff error exits.

Why

Malformed VCD data could previously be swallowed during signal-change iteration. In practice, an invalid command in the data section could make the tools stop reading early and exit as if the file had been processed successfully.

This change ensures parser failures are reported to callers and reflected in CLI exit behavior.

Testing

  • cargo test malformed_vcd_data --test diff_test
  • cargo test --test diff_test

@raptor1820

Copy link
Copy Markdown
Contributor Author

Fixed clippy errors.

@toddstrader

Copy link
Copy Markdown
Collaborator

Great, thanks for the fix and the tests.

@toddstrader toddstrader merged commit 8847113 into hudson-trading:main Jun 9, 2026
1 check passed
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.

2 participants