Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal list-bin does not produce marked output #8400

Closed
andreasabel opened this issue Aug 19, 2022 · 0 comments · Fixed by #8622 or #8670
Closed

cabal list-bin does not produce marked output #8400

andreasabel opened this issue Aug 19, 2022 · 0 comments · Fixed by #8622 or #8670
Assignees
Labels
cabal-install: cmd/list-bin cabal-testsuite re: devx Improving the cabal developer experience (internal issue)

Comments

@andreasabel
Copy link
Member

Lifted from #8392 (comment)

$ cabal list-bin cabal '-vnormal +markoutput +nowrap'
Warning: this is a debug build of cabal-install with assertions enabled.
-----BEGIN CABAL OUTPUT-----
Up to date
-----END CABAL OUTPUT-----
/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

This means the interesting output will not be part of a simple golden value.

The reason is that a plain putStr is used for the output:


That's not in line with convention. Output should be produced by the predefined API:
warn,
notice, noticeNoWrap, noticeDoc,
setupMessage,
info, infoNoWrap,

See also:

@andreasabel andreasabel added cabal-testsuite re: devx Improving the cabal developer experience (internal issue) cabal-install: cmd/list-bin labels Aug 19, 2022
@mergify mergify bot closed this as completed in #8622 Dec 10, 2022
andreasabel added a commit that referenced this issue Jan 13, 2023
The regular output of `cabal list-bin` should go to stdout always, but
be marked for the sake of the testsuite.
@andreasabel andreasabel self-assigned this Jan 13, 2023
@andreasabel andreasabel reopened this Jan 13, 2023
@mergify mergify bot closed this as completed in #8670 Jan 16, 2023
mergify bot added a commit that referenced this issue Jan 16, 2023
* Fix #8400 by marking output of `cabal list-bin`

The regular output of `cabal list-bin` should go to stdout always, but
be marked for the sake of the testsuite.

* Make test Windows-compatible

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cabal-install: cmd/list-bin cabal-testsuite re: devx Improving the cabal developer experience (internal issue)
Projects
None yet
2 participants