jaredly / jaredly/reason-language-server

Adding `(preprocess (pps ppx_deriving.std)))` results in an error on each file.

Open
#297 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
649
Forks
85
PR merge metrics
No merged PRs in 30d

Description

When I add `(preprocess (pps ppx_deriving.std)))` in dune, I get following error on each file:
```
Fatal error: exception Invalid_argument("Filename.chop_suffix") File "", line 1: Error: Error while running external preprocessor Command line: /home/thomas/Workspace/playing_with_projections_group/stream/_esy/default/store/b/quizzy_stream-28064658/default/.ppx/30a18adec0a1407675322d723bf1b0ae/ppx.exe --as-ppx --cookie 'library-name="lib"' '/tmp/camlppxb5ad57' '/tmp/camlppx92bc2d'
```

removing the preprocess fixes it. I'm using version 1.6.1 with vim.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the reported dune `(preprocess (pps ppx_deriving.std))` configuration and the ppx_deriving 1.6.1 setup. Trace how the language server invokes the external preprocessor, using the shown `ppx.exe --as-ppx` command as the entry point. Done means preprocessing succeeds for every file without the `Filename.chop_suffix` exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.