|Anonymous | Login | Signup for a new account||2014-03-07 13:43 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004713||OCaml||Camlp4||public||2009-02-10 20:20||2013-12-24 09:50|
|Target Version||4.01.1+dev||Fixed in Version|
|Summary||0004713: Camlp4o messes with comments|
|Description||Camlp4o messes with comments, hence with ocamldoc generation of documentation.|
In order for comments to be used by ocamldoc, they should come immediately before or after a value. Camlp4o moves comments away from values, hences breaks ocamldoc.
While there may be workarounds, it's quite annoying for documentation generation of Batteries Included, as it produces pages such as http://batteries.forge.ocamlcore.org/doc.preview:batteries-alpha3/html/api/GZip.html [^] .
Is there any hope that this could be fixed?
|Attached Files|| t.mli [^] (48 bytes) 2009-02-10 20:20 [Show Content]
camlp4.diff [^] (1,665 bytes) 2009-12-31 13:44 [Show Content]
|camlp4o t.mli => the comment is removed|
|camlp4o t2.mli => the first comment is moved from the first value to the second value, the second comment is removed|
|camlp4.diff - a dirty workaround that will partially fix observed behaviour (for interface files). Can't think of anything better unless comments become part of the Ast (why not?).|
Here is one more example : http://extunix.forge.ocamlcore.org/api/ExtUnixSpecific.html#TYPEadvice [^]
Is it possible to make comments part of the AST and will you consider such patch for inclusion?
Note that the problem is that you are using an intermediate on-disk file, camlp4 is not supposed to be used like this (you loose locations for example).
If you call ocamldoc on the file before it is preprocessed with the right -pp option, then the result is fine (i tried for extunix). A possible solution for extunix is to copy extUnix.mlpp to extUnixAll.ml and extUnixSpecific.ml and use camlp4 on both files. If you want i can provide a patch.
Thanks for looking into it - I will try to generate docs with simultaneous preprocessing and see how it goes. The generated files are included in distribution so I decided to generate docs from that files without much thinking.
(Anyway, camlp4 ideally shouldn't mess with comments).
|forwarded to https://github.com/ocaml/camlp4/issues/6 [^]|
|2009-02-10 20:20||Yoric||New Issue|
|2009-02-10 20:20||Yoric||File Added: t.mli|
|2009-02-10 20:22||Yoric||Note Added: 0004835|
|2009-02-10 20:22||Yoric||Note Added: 0004836|
|2009-03-28 17:19||xleroy||Status||new => assigned|
|2009-03-28 17:19||xleroy||Assigned To||=> ertai|
|2009-12-31 13:44||ygrek||File Added: camlp4.diff|
|2009-12-31 13:50||ygrek||Note Added: 0005216|
|2010-10-27 16:26||ygrek||Note Added: 0005692|
|2011-10-26 08:44||ertai||Assigned To||ertai => xclerc|
|2012-01-05 12:01||dim||Note Added: 0006597|
|2012-01-05 12:01||dim||Assigned To||xclerc => dim|
|2012-01-05 12:01||dim||Status||assigned => feedback|
|2012-01-05 16:38||ygrek||Note Added: 0006601|
|2012-07-11 14:58||doligez||Target Version||=> 4.01.0+dev|
|2012-07-11 15:52||doligez||Relationship added||related to 0004545|
|2012-07-11 16:06||doligez||Relationship added||related to 0004346|
|2012-07-31 13:36||doligez||Target Version||4.01.0+dev => 4.00.1+dev|
|2012-09-17 13:49||doligez||Target Version||4.00.1+dev => 4.01.0+dev|
|2013-08-02 14:43||doligez||Target Version||4.01.0+dev => 4.01.1+dev|
|2013-09-04 18:09||doligez||Tag Attached: patch|
|2013-12-22 04:28||ygrek||Note Added: 0010758|
|2013-12-24 09:50||dim||Status||feedback => closed|
|2013-12-24 09:50||dim||Resolution||open => reopened|
|Copyright © 2000 - 2011 MantisBT Group|