Skip to content

dev meeting 2024 08 20

Patrick Ferris edited this page Aug 24, 2024 · 1 revision

Agenda

  • 5.2 Bump Progess
    • Auto-generate AST pattern code and labelled arguments (e.g. value_binding ~constraint_:none but no positional argument?)
    • Ast_helper.Exp.function_ deprecation
    • Ptyp_open and recursive types.
    • opam-repository overlay for 5.2 AST bump
  • Issues in migrations
    • Bumping the AST has uncovered issues in migrating code up and down the internal ppxlib ASTs -- would be good to discuss this and also how to mitigate this going forward.
  • Documentation
  • Some carry over items from last week:
    • In general what is the medium term goals for ppxlib? Mostly maintenance and bumping the AST/keeping up with compiler releases?

Attendees

  • Nathan
  • Sonja
  • Patrick

Notes

TL;DR

  • 5.2 AST bump progress is waiting for patches to as many ppxes as possible and for fixes to the migration bug(s) (see next bullet point). If ppx authors wish to try the new ppxlib they can add an opam-overlay which also contains patches to a few existing ppxes:
    $ opam repo add git+https://github.com/patricoferris/opam-ppxlib-repository.git
    
  • Nathan has worked on a better AST printer inspired by the ppx_tools printer and the existing printing functionality of ppxlib. See this PR for more details. This should help better debug AST migration bugs. It makes good use of the AST lift class.
  • With breakages happening in Ast_helper and Ast_builder it became unclear why Ast_helper exists at all. There's a move to deprecate this module and promote the use of Ast_builder instead. This should help reduce maintenance costs and API breakages.
  • We need to consolidate our documentation better. There should be a focus on moving as much documentation to the mld and mli files as possible.

5.2 Bump Progress

  • Ast_builder
    • Ast_builder is much better than Ast_helper in terms of locations. Should we deprecate Ast_helper in favour of Ast_builder? Ultimately they have very similar APIs.
    • Start by deprecating this -- may as well just deal with one of these.
    • Make it clear why locations are important point to documentation.
  • Add positional arguments to some functions so that new optional arguments can be used!
  • Add warning about local opens and recursive checks on really_recursive.
  • Merge and release 5.2 as a single release.

Issues in Migrations

  • There is a bug in the migrations:
    • Was missing code for picking up attributes for the last argument. Migrating Pexp_fun and Pexp_function from < 5.2 going to Pexp_function in 5.2.
    • Nathan has some code for diffing/printing parsetrees to make this easier to debug.
    • The sexp dump is very unreadable, dumpast should be useful.

Documentation

Clone this wiki locally