hledger
hledger copied to clipboard
hledger-web tests fail on stackage
With setupTerm: Couldn't look up terminfo entry "unknown". Something to do with terminal helpers in Hledger.Utils.IO ?
https://github.com/commercialhaskell/lts-haskell/commit/1342c798114a09c49d87a59d25609fbe16098907
(thanks for filing, in the end I hesitated since I wondered if it's a problem on the stackage server env)
@juhp: when you have time could you clarify when you see this terminfo "unknown" error, with hledger-web tests ?
I failed to reproduce it with https://github.com/commercialhaskell/stackage/pull/7413.
Notes: hledger-lib's test suite seems currently disabled in stackage (because of issues running doctest). hledger-ui doesn't have a test suite. hledger-web's test suite is the only one using hspec. Most hledger packages import from transitively, even if they don't use, these three terminal-related packages: ansi-terminal, terminal-size, terminfo. Test runners also interact with the terminal.
Pausing this issue in favour of https://github.com/commercialhaskell/stackage/pull/7413
Unfortunately the situation remains unchanged:
Running tests for hledger-web 1.33.1, linux-x86_64
test: setupTerm: Couldn't look up terminfo entry "unknown"
Okay - pretty sure we just depend on https://packages.ubuntu.com/jammy/ncurses-term to get the "unknown" terminfo ... will re-run with installed package ... and keep you up-to-date ...
Hmm - doesn't seem to solve the problem - need to dive deeper ... maybe tomorrow ... (temporarily?) re-disabled tests ... any idea/hint welcome ...
I've tried to reproduce this inside the build container - without success - so my best guess is that this has to do with the user things happening here: https://github.com/commercialhaskell/stackage/blob/770b1939dc1784b0484b7f6aeb102c65a1f9cb25/automated/build.sh#L145
But I even tried to mimic this inside the container by creating another user and running nice -n 15 /bin/bash -c "chown other $HOME && exec sudo -E -u other env \"HOME=$HOME\" \"PATH=\$PATH\" ./verify-package hledger-web 2>&1" - but even this succeeds. So at least I have no idea what could be done with justifiable effort - so my suggestion would be to accept the test failure on stackage (as long it doesn't effect more packages) and close this issue without a solution.
Thank you @alaendle. Closing for now per this and the discussion on https://github.com/commercialhaskell/stackage/pull/7413.