Skip to content

Commit 07e5cd2

Browse files
panglesdjonludlam
authored andcommitted
Fix mld dependencies in reference driver
Signed-off-by: Paul-Elliot <peada@free.fr>
1 parent a3cfeb9 commit 07e5cd2

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/driver/packages.ml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,13 @@ let of_libs libs =
316316
:: acc)
317317
odoc_pages []
318318
in
319+
let update_mlds mlds libraries =
320+
List.map
321+
(fun mld ->
322+
let mld_deps = List.map (fun l -> l.odoc_dir) libraries in
323+
{ mld with mld_deps })
324+
mlds
325+
in
319326
Fpath.Map.fold
320327
(fun dir archives acc ->
321328
match Fpath.Map.find dir rmap with
@@ -342,11 +349,16 @@ let of_libs libs =
342349
m "%d mlds for package %s (from %d odoc_pages)" (List.length mlds)
343350
pkg.name
344351
(Fpath.Set.cardinal odoc_pages));
345-
346352
Util.StringMap.update pkg.name
347353
(function
348354
| Some pkg ->
349-
Some { pkg with libraries = libraries @ pkg.libraries }
355+
let libraries = libraries @ pkg.libraries in
356+
Some
357+
{
358+
pkg with
359+
libraries;
360+
mlds = update_mlds pkg.mlds libraries;
361+
}
350362
| None ->
351363
Some
352364
{

0 commit comments

Comments
 (0)