Skip to content

fix(parser): return errors for bad defchordsv2 includes instead of panicking - #2236

Merged
jtroo merged 1 commit into
jtroo:mainfrom
56steve:fix/chordsv2-include-panics
Oct 29, 2026
Merged

jtroo merged 1 commit into
jtroo:mainfrom
56steve:fix/chordsv2-include-panics

Conversation

@56steve

@56steve 56steve commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

An include entry in defchordsv2 panicked on a missing file name, a list in place of the file name, a file that cannot be read, or a chord file line without a tab. I turned each of those into a parse error that points at the include, and the include arm no longer discards errors through the flat_map over a Result.

Repro: (defchordsv2 (include) () 100 all-released ()) panicked at an unwrap in chord.rs.

@jtroo jtroo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks!

@jtroo
jtroo merged commit fe5c23a into jtroo:main Oct 29, 2026
5 checks 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