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
feature(pkg): improve checksum handling #7696
Conversation
01431e4
to
5a35cd0
Compare
5a35cd0
to
3262875
Compare
| Some (loc, _) -> | ||
User_error.raise ~loc | ||
[ Pp.text "Invalid checksum, got" | ||
; Dune_pkg.Checksum.pp actual_checksum |
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.
; Dune_pkg.Checksum.pp actual_checksum | |
; Checksum.pp actual_checksum |
According to the Dune monorepo benchmark, this PR introduces a regression in file-watching mode: Or maybe it's just noise? We should start looking at the benchmarks! |
The particular benchmark where there's a "regression" oscillates between ~80 and ~100 seconds. Also, this PR apparently speeds up another (hardly plausible) test by 16%. Definitely seems like noise given that this PR doesn't touch these code paths at all. |
Yeah, that seems right. Nevertheless, I'd love to see that table copied here by a bot. |
3262875
to
83ae2cc
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 sensible to me.
@@ -998,37 +1007,53 @@ module Fetch = struct | |||
|
|||
let is_useful_to ~distribute:_ ~memoize = memoize | |||
|
|||
let encode_loc f (loc, x) = | |||
Dune_lang.List | |||
(* TODO use something better for locs here *) |
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.
Do we have some common loc representation in Sexp? Like (loc (file f.ml) (line 42))
?
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.
Not that I could find.
83ae2cc
to
69818c8
Compare
* Add locations to various checksum errors * Add locations to checksum parsing errors Signed-off-by: Rudi Grinberg <me@rgrinberg.com> <!-- ps-id: 594bfdad-fa2d-493e-b259-bc7486124b39 -->
69818c8
to
4e068bd
Compare
Signed-off-by: Rudi Grinberg me@rgrinberg.com