Skip to content

rpc returns status 0 on connection terminated error #12445

@jchavarri

Description

@jchavarri

Expected Behavior

When rpc connection is terminated unexpectedly, status code should be non zero.

Actual Behavior

When rpc connection is terminated unexpectedly, status code is zero.

Reproduction

  • Open a terminal with a dune build in watch mode
  • On another terminal, call dune build <some_target>; echo "dune exit code: $?"
  • Kill the dune process in first terminal

Second terminal will show:

Error: { payload = Some [ [ "id"; [ "auto"; "0" ] ] ]
; message =
    "connection terminated. this request will never receive a response"
; kind = Connection_dead
}
dune exit code: 0

Specifications

  • Version of dune (output of dune --version): 3.19.1
  • Version of ocaml (output of ocamlc --version): 4.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions