Skip to content

Error messages are sometimes not displayed #6115

@esope

Description

@esope

Sometimes, error messages are not displayed at all when dune is run from a terminal.
If you redirect stderr to a file, however, then the error messages are correctly written to that file.
This bug seems to happen on the dev version of dune only.
I was not able to create a test that witnesses this behavior: tests seem to redirect stderr.

Expected Behavior

Whether stderr is redirected or not, the same error messages should be produced (with the exception of styles and colors, maybe).

Actual Behavior

It happens sometimes that dune command args produces no visible error messages, but dune command args 2> errors.txt writes some error messages to the file errors.txt.

Reproduction

dune describe bug displays no message at all.

dune describe bug 2> errors.txt writes the error message Error: Unknown constructor bug to errors.txt as expected.

Specifications

  • Version of dune: dev version, with git hash 87bc1bfa16136a9f8833e236c23b8454a309e55e
  • Version of ocaml: 4.14.0
  • Operating system (distribution and version): Linuxmint 21

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions