Skip to content

Commit c145534

Browse files
committed
More debug tweak.
1 parent 10be3b4 commit c145534

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

analysis/.depend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ src/PrepareUtils.cmx :
2525
src/PrintType.cmx : src/vendor/res_outcome_printer/res_outcome_printer.cmx \
2626
src/vendor/res_outcome_printer/res_doc.cmx
2727
src/ProcessAttributes.cmx : src/SharedTypes.cmx src/PrepareUtils.cmx
28-
src/ProcessCmt.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \
29-
src/Shared.cmx src/ProcessAttributes.cmx src/Log.cmx src/Files.cmx
28+
src/ProcessCmt.cmx : src/Utils.cmx src/SharedTypes.cmx src/Shared.cmx \
29+
src/ProcessAttributes.cmx src/Log.cmx src/Files.cmx
3030
src/Protocol.cmx : src/vendor/Json.cmx
3131
src/References.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \
3232
src/Shared.cmx src/ProcessCmt.cmx src/Log.cmx src/Infix.cmx src/Cmt.cmx

analysis/src/ProcessCmt.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,7 @@ let fileForModule modname ~package =
12621262
(* TODO: do better *)
12631263
let cmt = SharedTypes.getCmtPath ~interface:false paths in
12641264
let uri = SharedTypes.getUri paths in
1265-
Log.log ("FINDING docs for module " ^ SharedTypes.showPaths paths);
1266-
Log.log ("FINDING " ^ cmt ^ " uri " ^ Uri2.toString uri);
1265+
Log.log ("fileForModule " ^ SharedTypes.showPaths paths);
12671266
match fileForCmt ~moduleName:modname ~cmt ~uri state with
12681267
| None -> None
12691268
| Some docs -> Some docs)
@@ -1272,12 +1271,14 @@ let fileForModule modname ~package =
12721271
None)
12731272

12741273
let rec resolvePath ~env ~path ~package =
1274+
Log.log ("resolvePath path:" ^ pathToString path);
12751275
match resolvePathInner ~env ~path with
12761276
| None -> None
12771277
| Some result -> (
12781278
match result with
12791279
| `Local (env, name) -> Some (env, name)
12801280
| `Global (moduleName, fullPath) -> (
1281+
Log.log ("resolvePath Global path:" ^ pathToString fullPath ^ " module:" ^ moduleName);
12811282
match fileForModule ~package moduleName with
12821283
| None -> None
12831284
| Some file ->

analysis/src/References.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ let definitionForLocItem ~full:{file; package} locItem =
344344
| LModule (GlobalReference (moduleName, path, tip))
345345
| Typed (_, _, GlobalReference (moduleName, path, tip)) -> (
346346
maybeLog
347-
("Global defn " ^ moduleName ^ " " ^ pathToString path ^ " : "
347+
("Typed GlobalReference moduleName:" ^ moduleName ^ " path:" ^ pathToString path ^ " tip:"
348348
^ tipToString tip);
349349
match ProcessCmt.fileForModule ~package moduleName with
350350
| None -> None
@@ -353,6 +353,7 @@ let definitionForLocItem ~full:{file; package} locItem =
353353
match ProcessCmt.resolvePath ~env ~path ~package with
354354
| None -> None
355355
| Some (env, name) -> (
356+
maybeLog ("resolved path:" ^ name);
356357
match ProcessCmt.exportedForTip ~env name tip with
357358
| None -> None
358359
| Some stamp ->

analysis/tests/src/expected/Debug.res.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ Dependency dirs: tests/node_modules/@rescript/react/lib/bs/./src tests/node_modu
2727
Opens from bsconfig:
2828
locItems:
2929
0:18-0:21 Typed map (Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b> GlobalReference
30-
[ref] Global defn Belt List.map : Value
31-
FINDING docs for module Impl cmt:tests/node_modules/rescript/lib/ocaml/belt.cmt res:tests/node_modules/rescript/lib/ocaml/belt.ml
32-
FINDING tests/node_modules/rescript/lib/ocaml/belt.cmt uri belt.ml
33-
FINDING docs for module Impl cmt:tests/node_modules/rescript/lib/ocaml/belt_List.cmti res:tests/node_modules/rescript/lib/ocaml/belt_List.mli
34-
FINDING tests/node_modules/rescript/lib/ocaml/belt_List.cmti uri belt_List.mli
30+
[ref] Typed GlobalReference moduleName:Belt path:List.map tip:Value
31+
fileForModule Impl cmt:tests/node_modules/rescript/lib/ocaml/belt.cmt res:tests/node_modules/rescript/lib/ocaml/belt.ml
32+
resolvePath path:List.map
33+
resolvePath Global path:map module:Belt_List
34+
fileForModule Impl cmt:tests/node_modules/rescript/lib/ocaml/belt_List.cmti res:tests/node_modules/rescript/lib/ocaml/belt_List.mli
35+
resolvePath path:map
36+
[ref] resolved path:map
3537
[ref] Got stamp 1024
3638
[ref] alternateDeclared for Belt_List not found
3739
[ref] Inner uri belt_List.mli

0 commit comments

Comments
 (0)