odoc icon indicating copy to clipboard operation
odoc copied to clipboard

Reference/Path to module aliases of unexpanded/unavailable modules link to 404 (without warnings)

Open panglesd opened this issue 1 year ago • 1 comments

Suppose you have the following file:

(* test.ml *)
module X = Stdlib
module Y = X

module Z = struct
  let x = 1
end

module T = Z

(** {!X} {!Y} {!Z} {!T} *)

and you compile its doc without access to stdlib:

$ odoc compile test.cmt
$ odoc link test.odoc
$ odoc html-generate test.odocl -o html

Then no warnings will be emitted, but the first two references (to X and Y) will generate a link to a non existent page. The references to Z and T both link to the expansion of Z.

Linked with #1106.

panglesd avatar Apr 15 '24 06:04 panglesd

This is also triggered outside of references. For instance:

module type A = sig
  module X = Stdlib
  module Y := X
end

If Stdlib is not in the path, clicking on X in module Y := X will lead to a 404 page.

panglesd avatar Apr 18 '24 13:04 panglesd