Dune+tests+ocamllsp: extension is disabled because the tests would be ignored

From time to time I get and issue with OCaml language server when it gives an error message like: ppx_inline_test: extension is disabled because the tests would be ignored (the build system didn’t pass -inline-test-lib)

At the same time project compiles and runs tests OK without any possible complications, so problem is somewhere in ocaml-lsp. For some projects I never get this error message, I don’t know why. How should I investigate my issue?

$ cat fopm.ml
let%test _ = true
(library
 (name fopm_demo)
 (modules fopm)
 (inline_tests)
 (preprocess
  (pps ppx_inline_test)))

P.S. I googled a bit but it seems that this error message usually happens during compilation with dune, not related to ocaml-lsp

We are discussing this issue here

1 Like