Skip to content

"Warning: ... assertions enabled" should go to stderr, not stdout #8393

Closed

Description

@andreasabel

It it seems that the warning about assertions on goes to stdout, which is inconvenient for commands that produce reusable output, e.g. in use case $(cabal list-bin foo):

$ cabal list-bin cabal-install
Warning: this is a debug build of cabal-install with assertions enabled.
/Users/abel/bin/src/cabal/dist-newstyle/build/x86_64-osx/ghc-9.2.4/cabal-install-3.9.0.0/x/cabal/build/cabal/cabal

$ cabal list-bin cabal-install 2>/dev/null
Warning: this is a debug build of cabal-install with assertions enabled.
/Users/abel/bin/src/cabal/dist-newstyle/build/x86_64-osx/ghc-9.2.4/cabal-install-3.9.0.0/x/cabal/build/cabal/cabal

$ cabal list-bin cabal-install > /dev/null
<EMPTY>

Request: send the warning to stderr.

Correct behavior should be secured by testsuite.

Activity

  1. added
    re: warnings
    re: devx
    on Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuenewcomernewcomer: 1-one-line-changere: devxre: warnings

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions