-
Notifications
You must be signed in to change notification settings - Fork 99
dev meeting 2024 08 20
Patrick Ferris edited this page Aug 24, 2024
·
1 revision
- 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
- Auto-generate AST pattern code and labelled arguments (e.g.
- 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
- Great user feedback discuss which we should take onboard and work into https://github.com/ocaml-ppx/ppxlib/issues/324
- 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?
- Nathan
- Sonja
- Patrick
- 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
andAst_builder
it became unclear whyAst_helper
exists at all. There's a move to deprecate this module and promote the use ofAst_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
andmli
files as possible.
- 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.
- There is a bug in the migrations:
- Was missing code for picking up attributes for the last argument. Migrating
Pexp_fun
andPexp_function
from < 5.2 going toPexp_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.
- Was missing code for picking up attributes for the last argument. Migrating
-
Locations:
- The docs: https://ocaml.org/p/ppxlib/latest/doc/good-practices.html#resp_loc
- The issue: https://github.com/ocaml-ppx/ppxlib/issues/515
- What are Ghost locations/flags? We should look into this and document it nicely.
-
Source of Documentation for ppxlib-related things:
- Parsetree from ocaml/ocaml: https://github.com/ocaml/ocaml/blob/trunk/parsing/parsetree.mli
- Ppxlib docs: https://ocaml.org/p/ppxlib/latest
- OCaml.org: https://ocaml.org/docs/metaprogramming
- Dune: https://dune.readthedocs.io/en/stable/reference/preprocessing-spec.html
- The blogpost: https://tarides.com/blog/2019-05-09-an-introduction-to-ocaml-ppx-ecosystem/