Skip to content

dune tools install ocamllsp sometimes fails with server error (error kind: Code_error) #15756

Description

@shonfeder

Expected Behavior

dune tools install ocamllsp succeeds or returns an informative user error

Actual Behavior

Non-deterministically, the attempt fails with

Error: Server returned error:
server error (error kind: Code_error)

Reproduction

I have not been able to repro this reliably. It sometimes occurs, and if I retry a couple times, the installation will just go thru.

Specifications

  • Version of dune (output of dune --version): Nightly build 2026-08-10T03:08:22Z, git revision 4fd9626a1cc4c9019267e2c99fb02d9162a78213

Additional information

Looks like we are getting here somehow

https://github.com/shonfeder/dune/blob/5b109c3cb8bf4492415168f7597405aa13bfb569/src/rpc/server.ml#L526-L532

so maybe its a "server-side" issues? But in these cases no dune watch was running in the projects (AFAIK).

This will probably be fixed as a side effect of #12914

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev toolsDune's package-management of developer tools (e.g. `dune tools install ocamlformat`)package managementDune's package management — `(pkg)` stanza, lockdirs, `dune pkg` commands

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions