Closed kevinqiu closed 4 years ago
What versions of Jane Street ppx rewriters are you using?
Ah yes, sorry, should have included that:
OCaml: 4.04.2
core: v0.9.1
ppx_sexp_conv: v0.9.0
ppx_assert: v0.9.0
ppx_jane: v0.9.0
ppx_driver: v0.9.1
ppx_deriving: 4.1
I noticed in a perhaps related issue, https://github.com/janestreet/ppx_type_conv/issues/6, you mentioned including ppx_jane
in utop
enabled the ppx_type_conv
ppx_deriving
compatibility layer. What is the mechanism by which it does that? It wasn't immediately apparent looking at the repo. Do I need to do that here?
I found a different workaround that might be illuminating as to what is going on here.
I was not actually passing the --no-check
option to ppx_assert
because of the introduction of deprecated-ppx-method
.
So this works now:
ocamlfind ocamlc -linkpkg -thread -package core,ppx_sexp_conv,ppx_assert -ppxopt "ppx_assert.deprecated-ppx-method,-no-check" test.ml -o test.byte
But it seems strange that ppx_assert
would need that directive. Is it somehow invoking ppx_driver
? Adding another ppx like ppx_inline_test
causes the same error again and adding -no-check
to ppx_inline_test
fixes it.
Hmm, that doesn't seems right indeed. Basically when you do -package ppx_assert
, this gets translated to a -ppx <somedir>/ppx.exe
option. This ppx.exe
uses ppx_driver but in a special mode to apply a single transformation. Checks should be disabled in this mode
I don't know if this is still an issue and what package the issue is in (it's probably in ppx_driver, which itself is deprecated). I'm closing it because it's old. Feel free to re-open if it's still a problem.
Hi, I'm trying to use
ppx_sexp_conv
withocamlfind
and am running into issues when I try to include other Janestreet ppx. It works if I am just usingppx_sexp_conv
but attempting to includeppx_assert
in compilation (without even using it), results inError: Attribute 'deriving' was not used
. It looks like this issue is related: https://github.com/janestreet/ppx_let/issues/5 But adding-no-check
doesn't seem to work. Usingppx_jane
works but I'm not sure why and want to know what I'm doing wrong when I'm not using it.Code:
Build command that fails. I added the all the
-ppxopt
bits per the issue above, but it is still broken with those:Build command that works(by adding
ppx_jane
):