Skip to content

dev meeting 20210609

Nathan Rebours edited this page Jun 9, 2021 · 1 revision

Present at the meeting:

  • James Somers (@jsomers)
  • Guillaume Petiot (@gpetiot)
  • Nathan Rebours (@NathanReb)

Current plan

  • Nathan works a plan with Jon Ludlam from odoc to add support of MDX labels in mli files
  • James finishes testing Guillaume MDX + ocamlformat branch
  • James sends us the patch they have to apply to import MDX at JS so we can work out a way to ease that process in the future

Meeting notes

There hasn't been meeting notes for a little while so here's a summary of the situation from the past few weeks: Guillaume has been working on a branch of MDX that uses ocamlformat's RPC to format OCaml blocks in MDX. We have a working prototype but it's not as efficient as we'd like. ocamlformat's RPC was designed for tools like merlin or the vs-code plugin that have a single, long running process. They start their own instance of ocamlformat's RPC server at startup and then talk to it throuh the RPC client API for their entire lifecycle. MDX works a bit differently and is meant to be called by the build system, once for each file that contains MDX blocks, generating a .corrected version of the file to be used for promotion-like workflows. This means that in practice, in large projects, MDX is called a lot of times. With the current implementation of the formatting support in MDX, each of those MDX process will spawn its own instance of ocamlformat's RPC server.

What we'd like ideally here is to let the build system start as many of these as it would like, and then assign one of these to each MDX processes. That would also move the responsibility of selecting the profile from the RPC to the build system which is more aligned with the direction we'd like to take here.

It has proven a bit more challenging to figure out a good, portable way to do this and it will need a bit of thinking, a bit work and a new release of the ocamlformat's RPC.

While this is the goal we should aim for, the current version might be good enough to be released as is and improved later. We'd like to get an assessment of how it performs and whether that flat cost of starting an ocamlformat RPC server is a problem on large codebase.

James is working on testing Guillaume's MDX branch at JS and will get back to us with the results. He has been working on this lately but hasn't got it working yet. Given that we often have to try some of the MDX's changes at JS we'll try to see if the import of MDX within JS codebase can be simplified. James will send us the patch he has to apply to see if there is anything in it that it would make sense to upstream. Nathan and Guillaume will help James with this so we can get the results ASAP.

James rightfully asked about the status of MDX labels support in mli files. Things haven't changed on this front, Nathan will get back to Jon Ludlam to get an update on the odoc side of the feature and help getting this ready!

We'll get in touch at the beginning of next week to set up the next meeting, based on how things went so far.