Windows: Fatal errror: exception Failure("output_value: not a binary channel")
When working with menhir
as a native executable, I see this error come up:
C:\Users\bryph\.esy\3_\i\opam__slash__menhir-20171013.0.0-09217330\bin\menhir.exe
--strict --unused-tokens --fixed-exception --table --cmly
reason_parser.mly)
Warning: you are using the standard library and/or the %inline
keyword. We
recommend switching on --infer in order to avoid obscure type error
messages.
Fatal error: exception Failure("output_value: not a binary
channel")
This blocks using menhir
as a native Windows executable. On Windows, using the forked OPAM repo here: https://github.com/fdopen/opam-repository-mingw the issue is addressed via the provided patches... but it'd be great to upstream a fix you're open to it!
I've attached a patch that fixes this for Windows (using open_out_bin
in that case), but preserves existing behavior for non-Windows platforms.
Unfortunately, I was unable to open a merge request (forking the project is blocked in the UI, and says that I've exceed the limit of namespaces - I assume I may not have permissions), but I've attached a patch (menhir-windows-fix.patch) for your convenience. Please let me know if there is anything else I can do.
Related:
Thank you!