Jbuilder support for lwt.ppx?

lwt
jbuilder

#1

Is there a way to preprocess with lwt.ppx in jbuilder? If not, what needs to happen for it to be supported?


#2

I answered on the Lwt repo first. For readers here:

Yes, but for now you have to pin [Lwt] master. IIRC:

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.


#3

Thanks for the answer!


#4

jbuilder-based LWT is not in OPAM yet it seems. Any workarounds?


#5

From what I see, 3.1 is published and the source includes lwt.ppx with ocaml-migrate-parsetree support.


#6

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.


#7

Sorry, it was false alarm. It works nicely after all.