Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007478OCamlocamldocpublic2017-02-09 23:562017-08-09 11:44
Reporterdbuenzli 
Assigned Tooctachron 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.04.0 
Target Version4.06.0+devFixed in Version4.06.0+dev 
Summary0007478: Duplicate module preambles are generated by ocamldoc
DescriptionI suspect this is not a doc attachement issue (at least the dupe doesn't happen with odoc on 4.03). With ocamldoc 4.0{4,3}.0, "Hey ho" shows up twice in the generated doc. Note that if you remove the 'open String' this doesn't happen.
Steps To Reproduce> cat bla.mli

open String

(** Hey ho *)

> ocamldoc -html bla.mli
Tagsgithub
Attached Files

- Relationships

-  Notes
(0017244)
octachron (developer)
2017-02-10 12:44

This is indeed not so much an attachment issue, but a problem with the extraction of the module preamble within ocamldoc: ocamldoc considers that the first documentation comment is the module preamble and then skip this comment, if and only if this comment was an unattached documentation comment before any module elements.

As an illustration, the following signature does also generate a duplicated
comment:

(*a.mli*)
val x: unit
(** This comment will be used as amodule preamble and a documentation comment for x *)
(0017246)
octachron (developer)
2017-02-10 14:21

A possible fix implemented in https://github.com/ocaml/ocaml/pull/1037 [^] is to only use as module preamble documentation comments that occur before any module elements.
(0018167)
octachron (developer)
2017-08-09 11:44

Fixed by the integration of the above PR.

- Issue History
Date Modified Username Field Change
2017-02-09 23:56 dbuenzli New Issue
2017-02-10 12:44 octachron Note Added: 0017244
2017-02-10 14:21 octachron Note Added: 0017246
2017-02-19 16:59 xleroy Assigned To => octachron
2017-02-19 16:59 xleroy Status new => assigned
2017-02-19 16:59 xleroy Target Version => undecided
2017-02-23 16:06 doligez Tag Attached: github
2017-02-23 16:06 doligez Target Version undecided => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-02-23 16:46 doligez Category OCamldoc => ocamldoc
2017-06-09 11:08 doligez Target Version 4.05.0 +dev/beta1/beta2/beta3/rc1 => 4.06.0+dev
2017-08-09 11:44 octachron Note Added: 0018167
2017-08-09 11:44 octachron Status assigned => resolved
2017-08-09 11:44 octachron Fixed in Version => 4.06.0+dev
2017-08-09 11:44 octachron Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker