ocaml-doc / doc-ock

(DEPRECATED) Documentation generation for OCaml
ISC License
15 stars 5 forks source link

Module inclusion of module aliases in cmt triggers assertion #59

Closed dsheets closed 9 years ago

dsheets commented 9 years ago

Parsing the cmt from:

module B = struct
  include Bigarray
end
include B.Array1

results in

internal error, uncaught exception:
File "_build/lib-doc-ock/docOckCmi.cml-native", line 791, characters 21-27: Assertion failed
Raised at file "_build/lib-doc-ock/docOckCmi.cml-native", line 791, characters 21-33
Called from file "_build/lib-doc-ock/docOckCmt.cml-native", line 427, characters 13-56
Called from file "_build/lib-doc-ock/docOckCmt.cml-native", line 412, characters 17-47
Called from file "_build/lib-doc-ock/docOckCmt.cml-native", line 435, characters 25-62
Called from file "list.ml", line 84, characters 24-34
Called from file "_build/lib-doc-ock/docOckCmt.cml-native", line 433, characters 4-136
Called from file "_build/lib-doc-ock/docOckCmt.cml-native", line 443, characters 14-46
Called from file "_build/lib-doc-ock/docOck.cml-native", line 140, characters 31-75
Called from file "_build/bin-codoc/codocCliExtract.ml", line 57, characters 12-30
Called from file "_build/bin-codoc/codocCliExtract.ml", line 141, characters 8-52
Called from file "_build/bin-codoc/codocCliExtract.ml", line 177, characters 6-64

It appears to be the case that include declarations can have aliased module types.

This does not occur with cmi or cmti.

dsheets commented 9 years ago

This is the most severe issue of know of right now as it prevents the extraction of std_internal.cmt from core_kernel.

dsheets commented 9 years ago

In fact, something as simple as

module P = Pervasives
include P

will trigger this problem.