Closed jonahbeckford closed 5 months ago
Thanks a lot, @jonahbeckford , both for the issue, and for already starting to fix it! The error you're getting now seems specific to the metapp
PPX, doesn't it? Do you also get it when using other PPXs?
The error you're getting now seems specific to the metapp PPX, doesn't it? Do you also get it when using other PPXs?
Oops. ~I didn't update this ticket after I found the root cause.~ I did update this ticket, but I didn't make the update prominent. Fixing that now.
Root cause for metapp
: it does not like local development of ppxlib
since it parses the findlib reported ppxlib version and expects MAJOR.MINOR.PATH
. With a local ppxlib
findlib reports a git commit id based version number.
In the description I posted the next problem I encountered. It might belong elsewhere, but AFAIK there is a 50/50 chance it is a ppxlib issue (perhaps addressed by your PR comments). For visibility:
I fixed what I could in https://github.com/ocaml/merlin/pull/1723 but still there is an open problem with either ppxlib or merlin here.
It would make things much easier/quicker if someone who knew ppxlib could verify that the marshalled AST is being written correctly on Windows. Perhaps a test case with a known PPX that used -dump-ast
or -as-pp
? I realize that many people don't have access to a Windows machine, so this may not be possible.
From the ppxlib
side, this is fixed once https://github.com/ocaml-ppx/ppxlib/pull/465 is merged, right? The other two problems seem to be on metapp
and merlin
IIUC. Btw, have you opened an issue on metapp
as well?
From the
ppxlib
side, this is fixed once #465 is merged, right? The other two problems seem to be onmetapp
andmerlin
IIUC. Btw, have you opened an issue onmetapp
as well?
I don't consider metapp
to have a bug; it is just unusual. Yes, the two merlin issues have been opened and are closed/being-reviewed.
I guess we can close this now that #465 has been merged. Do do you confirm?
Closing. Thanks!
TLDR: Windows should have the binary mode set, but that fix causes other issues.
Context
I'm using Dune in an unusual way that is exposing this ppxlib bug. Basically, since I want to use PPX-es with Dune from a bytecode-only environment, and because Dune requires a C compiler to build a
(staged_pps)
or(pps)
driver, I have to resort to:That in turn runs
-as-pp
which writes tostdout
.So:
Initial Attempt. OUTDATED and FIXED.
I tried to fix it myself in https://github.com/ocaml-ppx/ppxlib/pull/465/files but was unsuccessful. I now get:
Second Attempt. MOVED TO MERLIN
Edit: Now at https://github.com/ocaml/merlin/issues/1724
It gets past the initial problem so https://github.com/ocaml-ppx/ppxlib/pull/465 looks fine. Now there is a new problem:
Pulling out my hair trying to find if this is a writing problem (ppxlib?) or a reading problem (merlin).
I fixed what I could in https://github.com/ocaml/merlin/pull/1723 but still there is an open problem with either ppxlib or merlin here.