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
irmin-pack: update flush, close and reload to return `Ro_not_allowed instead of raising an exception #2044
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2044 +/- ##
==========================================
- Coverage 64.48% 64.43% -0.06%
==========================================
Files 130 130
Lines 15604 15607 +3
==========================================
- Hits 10063 10056 -7
- Misses 5541 5551 +10
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks! Could you look to see if octez code needs updating with the new error? |
type error := | ||
[ `Index_failure of string | ||
| `Io_misc of Io.Unix.misc_error | ||
| `Ro_not_allowed ] |
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.
Since v
does not use Ro_not_allowed
it might be nice to not include it in its error type but I'm not sure of good names to distinguish the two categories of error. My first thought was create_error
and write_error
but write seems a little too broad. What do you think?
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.
write_error
sounds fine, or we could do create_error
and keep error
(which is even more generic 😄)
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.
kk, lets go with write_error
Okay, I split out the
It seems unaffected |
Thanks for checking. To satisfy my own curiosity, I just took a look to answer the question of why not. Turns out we raise exceptions on error at the store boundary: irmin/src/irmin-pack/unix/ext.ml Line 258 in b5d5e3f
So now callers will get a |
Closes #2043