Benchmarks: use Ppxlib to generate code instead of compiler-libs
What
Lib_benchmark depends on the parsetree to generate code. Unfortunately, som constructors have been removed in OCaml5. This MR rewrites the AST generation using Ppxlib.
Why
This makes it compilable with both OCaml 4.14 and 5, as PPxlib deals with the compatibility layer.
How
Manually testing the MR
As usual, from a switch with OCaml5 you can simply try make octez-snoop with and without this patch . The tests are checking that the generated code is correct with %expect and regressions, so there are no changes.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Pierrick Couderc