Skip to content

[merlin] preprocess + run results in -pp and not -ppx #4169

@gares

Description

@gares

It seems that while ocamlc is happy to receive marshaled AST, ocamllsp(merlin) is not happy receiving mashaled AST if a -pp is given (a -ppx would work).

At the same time preprocess with a user action generates a merlin config which passes -pp, and there seem to be no way to override this decision.

Expected Behavior

(preprocess (per_module  ((action (run "bla")) m)))

should/could generate a -ppx directive for merlin

Actual Behavior

generates always a -pp directive for merlin

Reproduction

opam list | grep serv
# ocaml-lsp-server         1.4.0       LSP Server for OCaml
opam list | grep dune
# dune                     2.8.2       Fast, portable, and opinionated build system
# dune-build-info          2.8.2       Embed build informations inside executable
# dune-configurator        2.8.2       Helper library for gathering system configuration
# dune-private-libs        2.6.2       Private libraries of Dune
git clone https://github.com/LPCIC/elpi
git checkout rm-merlin-hack
dune build
code . # open src/data.ml or src/runtime_trace_on.ml

See also #1212 , CC @voodoos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions