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
50
50
These bits are encoded using an OCaml-compatible variant of Base
51
51
64, as the hash is used to generate OCaml identifiers. *)
52
52
let file_hash loc =
53
- let s = Filename. basename loc.Location. loc_start.pos_fname in
53
+ let s = Digest. string ( Filename. basename loc.Location. loc_start.pos_fname) in
54
54
let e = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_'" in
55
55
let o = Bytes. create 6 in
56
56
let g p = Char. code s.[p] in
@@ -283,7 +283,7 @@ module Cmo = struct
283
283
; ev_kind = Event_after ty
284
284
; _ } ->
285
285
if pos_cnum' = pos_cnum + 1
286
- then Hashtbl. add events (Filename. basename pos_fname, pos_cnum) ty
286
+ then Hashtbl. add events (pos_fname, pos_cnum) ty
287
287
| _ -> () )
288
288
evl
289
289
@@ -459,7 +459,7 @@ module Cmo = struct
459
459
460
460
let find err loc =
461
461
let {Lexing. pos_fname; pos_cnum; _} = loc.Location. loc_start in
462
- try typ (Hashtbl. find (Lazy. force events) (Filename. basename pos_fname, pos_cnum))
462
+ try typ (Hashtbl. find (Lazy. force events) (pos_fname, pos_cnum))
463
463
with Not_found ->
464
464
Typ. extension ~loc @@ Location.Error. to_extension
465
465
@@ Location.Error. make ~loc ~sub: []
You can’t perform that action at this time.
0 commit comments