File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ let pat_args = function [] -> punit () | [p] -> p | l -> Pat.tuple l
5050 These bits are encoded using an OCaml-compatible variant of Base
5151 64, as the hash is used to generate OCaml identifiers. *)
5252let file_hash loc =
53- let s = Digest. string loc.Location. loc_start.pos_fname in
53+ let s = Filename. basename loc.Location. loc_start.pos_fname in
5454 let e = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_'" in
5555 let o = Bytes. create 6 in
5656 let g p = Char. code s.[p] in
@@ -283,7 +283,7 @@ module Cmo = struct
283283 ; ev_kind = Event_after ty
284284 ; _ } ->
285285 if pos_cnum' = pos_cnum + 1
286- then Hashtbl. add events (pos_fname, pos_cnum) ty
286+ then Hashtbl. add events (Filename. basename pos_fname, pos_cnum) ty
287287 | _ -> () )
288288 evl
289289
@@ -459,7 +459,7 @@ module Cmo = struct
459459
460460 let find err loc =
461461 let {Lexing. pos_fname; pos_cnum; _} = loc.Location. loc_start in
462- try typ (Hashtbl. find (Lazy. force events) (pos_fname, pos_cnum))
462+ try typ (Hashtbl. find (Lazy. force events) (Filename. basename pos_fname, pos_cnum))
463463 with Not_found ->
464464 Typ. extension ~loc @@ Location.Error. to_extension
465465 @@ Location.Error. make ~loc ~sub: []
You can’t perform that action at this time.
0 commit comments