fix(watch): drop the digest memo between rounds
This commit is contained in:
2 files changed
+5
No files matched your search
@@ -535,6 +535,7 @@ let cmd_compdb () =
|
|||||||
|
|
||||||
let cmd_watch names =
|
let cmd_watch names =
|
||||||
let round () =
|
let round () =
|
||||||
|
Cache.reset ();
|
||||||
let p = configure () in
|
let p = configure () in
|
||||||
with_config_header p;
|
with_config_header p;
|
||||||
let t0 = Unix.gettimeofday () in
|
let t0 = Unix.gettimeofday () in
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ let digest_file p =
|
|||||||
|
|
||||||
let forget p = Hashtbl.remove digests p
|
let forget p = Hashtbl.remove digests p
|
||||||
|
|
||||||
|
(* The memo saves re-hashing a header that half the project includes, so it is
|
||||||
|
only ever valid for one build. A watch loop runs many in one process. *)
|
||||||
|
let reset () = Hashtbl.reset digests
|
||||||
|
|
||||||
let key ~cmd ~inputs =
|
let key ~cmd ~inputs =
|
||||||
let b = Buffer.create 256 in
|
let b = Buffer.create 256 in
|
||||||
Buffer.add_string b cmd;
|
Buffer.add_string b cmd;
|
||||||
|
|||||||
Reference in new issue
Block a user