-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MastForest maximum node length invariant #1394
MastForest maximum node length invariant #1394
Conversation
@plafer LMK if this makes sense. And are we happy panicking in |
@sergerad Thank you for taking this on, it is super appreciated! The current implementation looks great; however, could you rebase it on the Hence, the current implementation can stay the same, and the new
If you are willing to do the work, returning an error would be much better as it's definitely the direction we want to go in. This would also require a similar change to |
Actually, thinking about it a bit more, I think it makes more sense for
|
Thanks very much for that guidance @plafer. I will make those changes including the removal of the panic. |
489e93f
to
c235257
Compare
@plafer I have added the node count invariant logic to MastForest and updated the relevant fns to return errors. Most of the diffs are due to adding unwrap() in test files. All other files should be handling the new errors, not unwrapping. I have done my best to handle those errors appropriately and map to AssemblyError. Let me know if and how to change the approach I have there with MastForestError. |
c235257
to
4b02340
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you for tackling this! I left a few small comments inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just left a few minor comments
Think I have covered all the current comments. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (let's fix clippy and wait for #1370 to be merged so that we can merge this into next
)
Merged #1370, and changed the target branch to |
a06971c
to
bcb4963
Compare
Fixed clippy and changelog 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you! I left one small comment inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good! Thank you!
Closes #1392