Add PackageCheck pretty print
Both principled (we export, use a pretty printer) and pragmatic (we don't surprise programs depending on Cabal by modifying Show behaviour (yet)) stance.
Please include the following checklist in your PR:
- [X] Patches conform to the coding conventions.
- [X] Any changes that could be relevant to users have been recorded in the changelog.
- [X] The documentation has been updated, if necessary.
Testsuite runs fine.
Since it makes visible changes to the output, would it make sense to add a test capturing the chosen output format just in case?
This patch should not change the program (cabal-install) output, if it does it is a bug! Or am I misreading you?
Since cabal-install uses Cabal as a library, I thought it’s possible to provoke these new error messages through cabal-install. But I haven’t thought too hard about it so I may be wrong.
Just to clarify what the patch does, there are no new error messages. We are simply replacing occourrences of show with pretty-print functions.
In the future we might want to deprecate or modify show to make it work correctly (i.e. output a representation of the data which could be read back and not an user-oriented error message); but that should be make with due care, since third party tools might rely on this incorrect behaviour.
Il 08 agosto 2022 alle 17:16 Artem Pelenitsyn ha scritto:
Since cabal-install uses Cabal as a library, I thought it’s possible to provoke these new error messages through cabal-install. But I haven’t thought too hard about it so I may be wrong.
-- Reply to this email directly or view it on GitHub: https://github.com/haskell/cabal/pull/8311#issuecomment-1208750201 You are receiving this because you authored the thread.
Message ID: @.***>
@mergify refresh
refresh
✅ Pull request refreshed
@mergify refresh
refresh
✅ Pull request refreshed
@mergify rebase
rebase
✅ Branch has been successfully rebased
Let me rebase to include a workaround to our CI instability and fix the tests.
@mergify rebase
rebase