ocaml-lsp icon indicating copy to clipboard operation
ocaml-lsp copied to clipboard

error when using unboxed-types

Open joprice opened this issue 4 years ago • 6 comments

I upgraded from 1.0 to 1.4 and now see the error [ocamllsp] [E] unknown flag -unboxed-types in vim using coc. I grepped for the flag and it shows up in the generated .merlin files, so perhaps this is a change the merlin, which may also have been updated. An example line is

./lib/.merlin:FLG -open Lib -w @[email protected]@30..39@[email protected]@[email protected] -strict-sequence -strict-formats -short-paths -keep-locs -w @A-42-44-48-45-4-30 -unboxed-types -short-paths

joprice avatar Dec 23 '20 10:12 joprice

Is this still an issue with the latest version? We've updated our merlin since.

rgrinberg avatar Apr 21 '21 22:04 rgrinberg

I'm having trouble building the master branch with opam2nix right now:

File "lsp/src/import.ml", line 163, characters 10-28:
163 |           List.partition_map xs ~f:(fun (k', v') ->
                ^^^^^^^^^^^^^^^^^^
Error: Unbound value List.partition_map

joprice avatar May 08 '21 19:05 joprice

You're using an old version of OCaml I bet. partition_map was introduced in 4.12

rgrinberg avatar May 08 '21 19:05 rgrinberg

That was it. So lsp only supports 4.12+?

joprice avatar May 08 '21 22:05 joprice

ocaml-lsp-server is already 4.12. I suppose it isn't ideal to impose this on the lsp library. So I backported partition_map.

rgrinberg avatar May 09 '21 01:05 rgrinberg

I still get the same error with the latest.

joprice avatar May 09 '21 17:05 joprice