ocaml-doc / doc-ock

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

DocOckEnvironment.read_class_type_ident asserts on lwt.2.4.5 syntax/pa_lwt_log.cmti #41

Closed dsheets closed 9 years ago

dsheets commented 9 years ago
lwt.2.4.5/_build/syntax/pa_lwt_log.cmti
codoc: internal error, uncaught exception:
       File "_build/lib-doc-ock/docOckEnvironment.cml-native", line 306, characters 22-28: Assertion failed

'codoc doc --package lwt.2.4.5 /home/dsheets/.opam/doc/build/lwt.2.4.5 -o test-opam-glue' exited with code 1
dsheets commented 9 years ago

This is higher severity than #36 and presently the most urgent issue.

dsheets commented 9 years ago

Same error for camomile.0.8.5 camomileLibraryDefault.cmti.

lpw25 commented 9 years ago

I can't reproduce this with my test progam:

./testCmti ~/.opam/4.02.1+doc/build/lwt.2.4.5/_build/syntax/pa_lwt_log.cmti

I'll try with codoc itself.

dsheets commented 9 years ago

Maybe the lookup -> None case in the test program? I have a lot of stuff loaded in the resolution environment.

Drup commented 9 years ago

Same error for ocamlnet.3.7.7 :

/home/gabriel/.opam/4.02.1+doc/build/ocamlnet.3.7.7/src/netcgi2-plex/netcgi_plex.cmti
codoc: internal error, uncaught exception:
       File "_build/lib-doc-ock/docOckEnvironment.cml-native", line 306, characters 22-28: Assertion failed
lpw25 commented 9 years ago

The lookup -> None is to do with resolution, but docOckEnvironment is about looking up local identifiers which is done as part of reading the cmti file.

lpw25 commented 9 years ago

I don't know how to use codoc. I just get:

codoc: internal error, uncaught exception:
       Sys_error("share/codoc.css: No such file or directory")
lpw25 commented 9 years ago

Okay, now I am failing to reproduce with codoc:

$codoc doc -o lwt ~/.opam/4.02.1+doc/build/lwt.2.4.5/_build/syntax/pa_lwt_log.cmti
/home/leo/.opam/4.02.1+doc/build/lwt.2.4.5/_build/syntax/pa_lwt_log.cmti
lpw25 commented 9 years ago

Okay I've reproduced it now

lpw25 commented 9 years ago

The problem is not in pa_lwt_log.cmti it is in whichever file codoc is looking at after pa_lwt_log.cmti -- the printing of the file name seems to be done after the error. This is why I couldn't reproduce the bug with the test program.

dsheets commented 9 years ago

printf here https://github.com/dsheets/codoc/blob/master/cli/codocCliDoc.ml#L301

lpw25 commented 9 years ago

I had it backwards. pa_lwt_log.cmti is the last file looked at. The error then happens when lwt_engine.cmti is processed -- which happens later than the printfs. I can now reproduce the error using the test program.

lpw25 commented 9 years ago

Fixed. Although lwt now fails due to #36.