-
Notifications
You must be signed in to change notification settings - Fork 70
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
use digestif hashes #310
use digestif hashes #310
Conversation
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.
Ok, a big PR about functor hell.
- One other question is about
Inflate
andDeflate
, it's really needed to keep them in interfaces? - If we need to provide
Map.S
andSet.S
indigestif
Digestif.S.eq
orDigestif.S.equal
?
And then, an ocamlformat
pass is really needed at the end.
src/git/pack.ml
Outdated
module Hunk = Hunk(Hash) | ||
module Pack = Pack(Hash)(Deflate)(Entry)(Delta)(Hunk) | ||
module Stream (Hash: S.HASH) (Deflate: S.DEFLATE) = struct | ||
module XEntry = Entry(Hash) |
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.
Why X...
?
val feed_cstruct: ctx -> Cstruct.t -> ctx | ||
val compare: t -> t -> int | ||
val hash: t -> int | ||
val equal: t -> t -> bool |
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.
We need to choose between eq
and equal
but have both is not a good idea. I think equal
should be the best and I can change API of Digestif.S
to provide equal
instead eq
but we need to choose one - then if we choose equal
, we need to update this PR to replace any H.eq
to H.equal
.
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.
yes I think Digestif.S
should provide equal
instead of eq
.
514b2d8
to
ecd8886
Compare
Rebased and fixed to take the comments into account. |
The patch is too invasive to my taste, but I had to flatten a lot of the modules hiearchies to make everyting compile...
Odd constraints on windows:
|
The windows issues should be fixed by ocaml/opam-repository#12575 |
Use Digestif.S instead of custom hash signature
The patch is too invasive to my taste, but I had to flatten a lot of the modules hiearchies to make everyting compile...