chore(file source): Add Fingerprinter::FirstLineChecksum#2904
chore(file source): Add Fingerprinter::FirstLineChecksum#2904
Conversation
3d3417c to
da77c40
Compare
Signed-off-by: MOZGIII <mike-n@narod.ru>
da77c40 to
108596d
Compare
|
Thanks, @MOZGIII. From a UX perspective, I'm a little concerned with 3 different options when, at the end of the day, this is just a checksum. If we decide to implement this I'd prefer that we work it in as an option to the already existing Regardless, I defer to @lukesteensen on how we should approach this, if at all. |
Signed-off-by: MOZGIII <mike-n@narod.ru>
|
@binarylogic this is an internal implementation, we can make the user-facing configuration different, taking your concerns into account! From the technical point of view, the config parameters for the two checksum algorithms are disjoint, so it makes sense to express that explicitly in the type system at the internal implementation. |
|
@lukesteensen given your comment on #2890 (comment) should we approve this? |
lukesteensen
left a comment
There was a problem hiding this comment.
Thanks for your patience with this! Glad we were able to come to an understanding and get this done.
Signed-off-by: MOZGIII <mike-n@narod.ru>
…v#2904) * Add Fingerprinter::FirstLineChecksum Signed-off-by: MOZGIII <mike-n@narod.ru> * Remove the lifetime rebind as it's not required Signed-off-by: MOZGIII <mike-n@narod.ru> * Fix a typo Signed-off-by: MOZGIII <mike-n@narod.ru> Signed-off-by: Brian Menges <brian.menges@anaplan.com>
This PR implements first-line-checksum fingerprinter outlined at #2890.
It is a concrete implementation proposal, and also a proof of concept. Tests ensure that we achieve the desired behavior and also serve as the illustration for the properties of the solution.
One of the questionable moments is filling the buffer with
0before leaving the match arm. We could alternatively pass the shorter slice to thechecksum_ecma, but I'm not sure what we'd prefer here.