Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interface doc #571

Merged
merged 3 commits into from
Jan 28, 2021
Merged

Add interface doc #571

merged 3 commits into from
Jan 28, 2021

Conversation

jonludlam
Copy link
Member

Signed-off-by: Jon Ludlam jon@recoil.org

Signed-off-by: Jon Ludlam <jon@recoil.org>

{2 Output formats}

Odoc currently outputs HTML files, man pages and latex documents. In a similar vein to the CLI interface,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the odoc dev meeting: need a statement of intermediate file formats as well (e.g. are odoc files supported)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


- odig
- dune
- ocaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odoc dev meeting: note that this is OCaml 4.12.0 onwards

Comment on lines 22 to 26
- Comments describing class inheritance are not rendered (bug)
- Odoc does not currently handle ambiguously associated doc comments (bug)
- Odoc does not ignore tags where they don't make sense (e.g. [@param] tags on instance variables are rendered) (bug)
- {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#ss:ocamldoc-formatting}Alignment elements} are not handled ([{C text}], [{L text}] and [{R text}])
- Odoc does not recognise {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sss:ocamldoc-html-tags}html tags embedded in comments}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from dev meeting: turn these into bugs on github and link as they will be fixed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


{4 Improvements}
- Odoc has a better mechanism for disambiguating references in comments. See 'reference syntax' later in this document.
- Support for standalone 'mld' files - these are documents using the OCamldoc markup, but rendered as distinct pages.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe built-in support for mld files? ocamldoc supports documentation-only "modules" with the --text option.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Odoc has several internal libraries. The only one of these for which we currently expect external users is
the comment parser. This will soon be removed into an external package to link with separately and will
have its own lifecycle and support statement. Note that this will perform the same function as the existing
[octavius] library, which was the original implementation of odoc's current parser.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this replace octavius instead of sitting alongside it? there should be no valid usecases of octavius after this odoc parser is pulled out

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

+ [@returns] is a synonym for [@return]
+ [@raises] is a synonym for [@raise]
+ [@open] and [@closed] and [@inline] are hints for how 'included' signatures should be rendered
+ [@canonical] allows a definition of a module to be marked as canonically elsewhere.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lpw25 from dev meeting: we dont support !modules and the list of modules, and the table of contents is also unsupported. These are omissions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except or the lack of synopsis !modules is perfectly supported. I use it in almost every of my packages out there and in odig's automatic index.mld generation for packages that do not provide one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added {!indexlist} in the omissions and added the issue @dbuenzli mentioned to the 2.0 milestone.

+ [@raises] is a synonym for [@raise]
+ [@open] and [@closed] and [@inline] are hints for how 'included' signatures should be rendered
+ [@canonical] allows a definition of a module to be marked as canonically elsewhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lpw25 from dev meeting: we dont have @hidden and would be nice to add so that ppx can use it. its already a bool in the model so this is mostly an external change

Copy link
Member Author

@jonludlam jonludlam Jan 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#578 - we can add that in here when it's done.

jonludlam and others added 2 commits January 28, 2021 13:56
Co-authored-by: Anil Madhavapeddy <anil@recoil.org>
Signed-off-by: Jon Ludlam <jon@recoil.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants