Skip to content

Commit

Permalink
Driver: don't include source dir if no implementation are rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
panglesd committed Dec 5, 2024
1 parent 4d5d7c4 commit f5acc73
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/driver/odoc_units_of.ml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,18 @@ let packages ~dirs ~extra_paths ~remap (pkgs : Packages.t list) : t list =
[ Landing_pages.package ~dirs ~pkg ~index ]
in
let src_index :> t list =
if List.length pkg.libraries > 0 then
if
(* Some library has a module which has an implementation which has a source *)
List.exists
(fun lib ->
List.exists
(fun m ->
match m.Packages.m_impl with
| Some { mip_src_info = Some _; _ } -> true
| _ -> false)
lib.Packages.modules)
pkg.libraries
then
let index = index_of pkg in
[ Landing_pages.src ~dirs ~pkg ~index ]
else []
Expand Down

0 comments on commit f5acc73

Please sign in to comment.