Fix merlin generation
The optional build contexts were being dropped from the obj dirs instead of the source dirs. Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
62edd42d8a
commit
8f16afe293
|
@ -129,10 +129,10 @@ let dot_merlin sctx ~dir ~scope ({ requires; flags; _ } as t) =
|
|||
let (src_dirs, obj_dirs) =
|
||||
Lib.Set.fold requires ~init:(Path.Set.empty, Path.Set.empty)
|
||||
~f:(fun (lib : Lib.t) (src_dirs, build_dirs) ->
|
||||
( Path.Set.add src_dirs (Lib.src_dir lib)
|
||||
, Path.Set.add build_dirs (
|
||||
Lib.obj_dir lib
|
||||
|> Path.drop_optional_build_context)))
|
||||
( Path.Set.add src_dirs (
|
||||
Lib.src_dir lib
|
||||
|> Path.drop_optional_build_context)
|
||||
, Path.Set.add build_dirs (Lib.obj_dir lib)))
|
||||
in
|
||||
Dot_file.to_string
|
||||
~remaindir
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
B $LIB_PREFIX/lib/findlib
|
||||
B $LIB_PREFIX/lib/ocaml
|
||||
B ../_build/default/exe/.x.eobjs
|
||||
B ../lib/.foo.objs
|
||||
B ../_build/default/lib/.foo.objs
|
||||
S $LIB_PREFIX/lib/bytes
|
||||
S $LIB_PREFIX/lib/findlib
|
||||
S $LIB_PREFIX/lib/ocaml
|
||||
S ../_build/default/lib
|
||||
S .
|
||||
S ../lib
|
||||
FLG -w -40
|
||||
# Processing lib/.merlin
|
||||
B $LIB_PREFIX/lib/bytes
|
||||
|
|
Loading…
Reference in New Issue