Is there a way to preprocess with lwt.ppx in jbuilder? If not, what needs to happen for it to be supported?
I answered on the Lwt repo first. For readers here:
Yes, but for now you have to pin [Lwt]
opam pin add --dev-repo lwt
Here is an example jbuild for using the PPX:
(jbuild_version 1) (executable ((name hello_world) (libraries (lwt.unix)) (preprocess (pps (lwt.ppx)))))
We plan to publish the jbuilder-based Lwt in OPAM in the next release, 3.1.0, ETA mid-late July.
Let me know if you have any trouble.
Thanks to @andrewray for the build system port.
Thanks for the answer!
jbuilder-based LWT is not in OPAM yet it seems. Any workarounds?
From what I see, 3.1 is published and the source includes
lwt.ppx with ocaml-migrate-parsetree support.
Indeed, Lwt 3.1.0 (about 1.5 months ago) is the first release with Jbuilder support. I believe it works as expected for a Jbuilder project. We also have tests that the Jbuilder packaging is correct.
Sorry, it was false alarm. It works nicely after all.