@@ -703,8 +703,6 @@ end = struct
703
703
end
704
704
705
705
let locate ~config ~ml_or_mli ~path ~lazy_trie ~pos ~str_ident loc =
706
- File_switching. reset () ;
707
- Fallback. reset () ;
708
706
Preferences. set ml_or_mli;
709
707
log ~title: " locate"
710
708
" present in the environment, walking up the typedtree looking for '%s'"
@@ -740,6 +738,8 @@ let from_longident ~config ~env ~lazy_trie ~pos nss ml_or_mli ident =
740
738
locate ~config ~ml_or_mli ~path: tagged_path ~lazy_trie ~pos ~str_ident loc
741
739
742
740
let from_path ~config ~env ~local_defs ~pos ~namespace ml_or_mli path =
741
+ File_switching. reset () ;
742
+ Fallback. reset () ;
743
743
let str_ident = Path. name path in
744
744
if Utils. is_builtin_path path then
745
745
`Builtin
@@ -761,6 +761,8 @@ let from_path ~config ~env ~local_defs ~pos ~namespace ml_or_mli path =
761
761
| `Found (loc , _ ) -> find_source ~config loc str_ident
762
762
763
763
let from_string ~config ~env ~local_defs ~pos ?namespaces switch path =
764
+ File_switching. reset () ;
765
+ Fallback. reset () ;
764
766
let browse = Mbrowse. of_typedtree local_defs in
765
767
let lazy_trie =
766
768
lazy (Typedtrie. of_browses ~local_buffer: true
@@ -808,6 +810,8 @@ let from_string ~config ~env ~local_defs ~pos ?namespaces switch path =
808
810
| `Found (loc , _ ) -> find_source ~config loc path
809
811
810
812
let get_doc ~config ~env ~local_defs ~comments ~pos =
813
+ File_switching. reset () ;
814
+ Fallback. reset () ;
811
815
let browse = Mbrowse. of_typedtree local_defs in
812
816
let lazy_trie = lazy (Typedtrie. of_browses ~local_buffer: true
813
817
[Browse_tree. of_browse browse]) in
0 commit comments