ocaml-ppx / ppxlib

Base library and tools for ppx rewriters
MIT License
244 stars 94 forks source link

ocaml.ppx.context's local_path format changes in OCaml 5.2 #475

Closed NathanReb closed 3 months ago

NathanReb commented 5 months ago

Starting from 5.2 we won't be able to read [@@@ocaml.ppx.context ...] attributes from older versions. This prevents users to run the driver on binary ASTs from older versions if the driver is built with ocaml 5.2 or above.

We can provide support for this by rewriting those attributes during the migrations. We could also consider not supporting this for arbitrarily old binary ASTs but I would not recommend we go down that road unless it requires a lot of effort to maintain which I don't think is the case here.

After #474 is merged, our test suite won't catch this bug anymore so I'm opening this issue not to lose track of this bug.

As a first step we at least need to fix or improve this test, or add another one so we do catch this bug.

NathanReb commented 3 months ago

This has been fixed on trunk-support