Skip to content

Dev meeting 22 03 2024

Sonja Heinze edited this page Mar 22, 2024 · 1 revision

Agenda

  • Recap of the 5.2 support efforts.
  • What do we want to do next?
    • Bump the AST? If so, let's discuss
      • if we're going to create a PPX universe to send the patch PRs
      • or if are we going to make use of the opam-repo CI and only clone the PPXs that we break.
    • Or retake the work on upstreaming Astlib?
    • Or something else? There's enough small improvements to do.
  • Can we take turns in running these dev-meetings?
  • If time: How to improve our repo hygiene to make it easier for external contributors to get involved.

Attendees

  • Nathan / @NathanReb
  • Nick / @ncik-roberts
  • Paul-Elliot / @panglesd
  • Sonja / @pitag-ha

Notes

Recap of the 5.2 support efforts

  • Bug about type constraint pattern
    • Found from the health-check
  • Nick: How can 5.2 -> 5.1 -> 5.2 preserve the original arity nature of the function. Nathan: down-migration preserves the 5.2 info via attrs.
  • PE: The upward migration has to decide on the arity of PPX generted functions
  • Nick: The encoding ppxlib uses after down-migration looks very similar to the encoding at JS (an attribute). For functions inserted by ppxes, we assume ppxes want to construct functions with the max arity possible.

General question: Is it a good strategy to write the down-migration with a lot of care for detail, in exchange for being able to delay the AST bump?

  • Nathan: It's not much more work to get both round-trips right than getting one right.

Do we want to bump the AST now?

  • Nick: For Jane Street it's not as important as he originally expressed.
  • Nathan: Now that his work is funded, he'd like to do the work of bumping the AST.
    • Will give it a look how much work it would be to create the necessary "universe". If it's not too much, he'll do it now, also because now the changes are fresh on our minds, and for PPX authors to to have the benefits of the arity change.
  • We'll need to find out if Jane Street will take care of their own PPX patches or will expect us to do that.
    • We could facilitate Jane Street taking care of it themselves by providing a branch with the AST bump, which Jane Street can use to patch their PPXs
  • Nick: Example of why we might want to patch metaquot when the AST is bumped (see below)
[%expr fun x -> [%e e]]

In 5.1, the arity of this would be 1 + arity(e). In 5.2 (without changes to metaquot) the arity of this would be 1 (a 1-ary function returning e). This could cause issues for performance of the generated code.

Jane Street handled this by having metaquot coalesce the arity of a constructed Pexp_function node.

Upstreaming Astlib

ETA for ourselves: We'll want to have all the discussions finished and a prototype before 5.3.

Taking turns in running these meetings

Sonja will run the meetings in odd months. Nathan will run them in even months. Nathan will open a PR on the GH wiki to persist the process of running the meetings.

PPXs in dune

Nathan is planning to open a PR to the ppxlib driver to improve the support for PPXs in dune he's been working in. No need to review straight away.

Clone this wiki locally