ci, doc: redefine odoc focus

What

Carefully reconsider the set of source directories processed by odoc.

Why

Currently, some recently added source directories such as brassaia/ or ìrmin/ are scanned by Odoc when publishing the documentation in the master_branch pipeline but not when building documentation in the before_merging pipeline (see, respectively, targets odoc vs odoc-lite in docs/Makefile).

This has the effect that syntax errors in docstrings located in these directories slip undetected during the usual MR lifetime, and may block the publishing of this and later MRs' documentation.

How

Good question!

So we're searching solutions for syncing the OCaml source directories processed by Odoc at doc building & publishing, so that the difference is limited to the frozen old protocols, which may never introduce new Odoc errors.

The simplest solution is to process during doc build all the directories containing OCaml source code, including the following (currently excluded) ones:

  • brassaia, ci, client-libs, contrib, data-encoding, devtools, irmin, etherlink, manifest

However, that has a cost of adding 4 mins to the CI job documentation:odoc, executed many times in the before_merge pipe:

  • make odoc  3958.88s user 2668.40s system 539% cpu 20:29.22 total
  • make odoc-lite  3497.97s user 1698.61s system 528% cpu 16:22.71 total

Another, more economic solution, is to remove some directories in the list above from the CI job documentation:publish if we don't care about that doc.

I propose to choose the second solution, by removing from doc publishing the same directories that are excluded at doc build.

Manually testing the MR

Study the directories processed by Odoc when building, and respectively, publishing documentation are the same.

Optionally, inject some error in some docstring within brassaia/, and check that the CI job documentation:odoc fails as expected.

Checklist

  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Nic Volanschi

Merge request reports

Loading