odoc icon indicating copy to clipboard operation
odoc copied to clipboard

Improvements to the manpage

Open Julow opened this issue 2 years ago • 6 comments

I updated the documentation for some commands and added consistency. Sub commands are grouped and sorted in sections, to show the useful commands first. I also updated some doc strings.

I added some documentation about dependency between compile and link phases.

The last commit concatenate the output of all --help into one page in the documentation. It's not easy to navigate because it's big and the TOC is not very readable. I'm considering generating a different page for each subcommand, what do you think?

Julow avatar Oct 24 '22 10:10 Julow

I've changed the manpage generator tool to parse odoc --help and extract more information: order of the commands, sections, summaries.

Julow avatar Nov 21 '22 08:11 Julow

Something is going wrong on macOS - CI is failing and I've seen a similar thing locally too.

jonludlam avatar Nov 28 '22 13:11 jonludlam

I've removed the manpage parsing from the runtest alias, so it cannot break the tests now. This can be improved after the release.

Julow avatar Nov 29 '22 15:11 Julow

I'd really really prefer not to be parsing the man output. I'd far rather work with the Cmdliner types and generate the mld file from them, but I think it's not possible today as the types are opaque. @dbuenzli do you have any suggestions? would you be receptive to either a new help output format -- 'mld' -- in cmdliner, or exposing something to allow this to be done more nicely?

jonludlam avatar Nov 29 '22 18:11 jonludlam

would you be receptive to either a new help output format -- 'mld' -- in cmdliner, or exposing something to allow this to be done more nicely?

No. I'm a bit dubious about the usefulness of all this.

Man pages are a terrible documentation medium. Keep them at the minimum as the reference for the cli interface and have good high-level docs. I doubt there's much value in having them alongside the .mld files.

If you really have to then odoc --help=groff | groff -Thtml is your friend.

dbuenzli avatar Nov 29 '22 20:11 dbuenzli

We can pass the values around without going through cmdliner and without parsing but as @dbuenzli says, perhaps it's not so useful ?

We can merge the improvements to the documentation without this, before the release: https://github.com/ocaml/odoc/pull/912

Julow avatar Nov 30 '22 08:11 Julow