Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006254OCamlOCamldocpublic2013-12-01 07:422014-02-19 16:51
Reporterjtoman 
Assigned Toguesdon 
PrioritynoneSeverityfeatureReproducibilityN/A
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006254: Generate links to exception definitions referenced in @raise tags
DescriptionIt would be nice if the Ocamldoc tool automatically generated links to exceptions referenced in doc comments via the @raise tag.

Attached are two patches that contain potential starting points for this feature (both of which have been applied against trunk).

About these patches:
Both add a new option to ocamldoc, -link-raise which will, when possible, generate cross links between exceptions referenced in @raise comments and their definition. If the cross referencing is impossible due to limitations on the output format (or a cross reference wasn't found) the old style comments are generated instead.

The first approach, link_raise_field.patch, adds a new option field to the raised_exception type. A value of "None" for this field indicates no cross-reference was found (or the user did not opt into cross-referencing). A value of "Some path" indicates the reference exception was found and the string path is a fully qualified path which can be used to generate a link. This approach will break any custom generators and required touching more code.

The second approach, link_raise_bc.patch adds a new field, i_linked_exc which is an associative list mapping the exception name in i_raised_exc to it's full path (for linking). The absence of an exception from the link indicates that no cross-reference was found, or that the user did not opt-into the cross-referencing. This approach was more backwards compatible with existing code, hence the name.
Tagspatch
Attached Filespatch file icon link_raise_bc.patch [^] (14,720 bytes) 2013-12-01 07:42 [Show Content]
patch file icon link_raise_field.patch [^] (17,861 bytes) 2013-12-01 07:42 [Show Content]

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-12-01 07:42 jtoman New Issue
2013-12-01 07:42 jtoman Status new => assigned
2013-12-01 07:42 jtoman Assigned To => guesdon
2013-12-01 07:42 jtoman File Added: link_raise_bc.patch
2013-12-01 07:42 jtoman File Added: link_raise_field.patch
2014-02-19 16:51 doligez Tag Attached: patch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker