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

re-enable hledger-web tests / troubleshoot terminfo error #7413

Merged
merged 1 commit into from
May 22, 2024

Conversation

simonmichael
Copy link
Contributor

@simonmichael simonmichael commented May 10, 2024

Trying to reproduce terminfo-related error when running tests. simonmichael/hledger#2157

@juhp
Copy link
Contributor

juhp commented May 11, 2024

Do you want me to apply this or should we convert it to a draft?

@simonmichael
Copy link
Contributor Author

Do you want me to apply this or should we convert it to a draft?

I'd be happy to see the result, but I'm assuming it'll show you the same setupTerm unknown error you saw before. Really I was just trying to reproduce that, and now I see this is not the way. So I guess I'll make this a draft.

I believe reproducing it requires running the curator tool and building all of stackage (?) which might be a bit much for me (or not ?) Is there a log you can point me to where I can see the error message and maybe suggest some extra debug logging ?

@simonmichael simonmichael marked this pull request as draft May 12, 2024 03:11
@simonmichael
Copy link
Contributor Author

simonmichael commented May 14, 2024

Here are some notes gathered from the related simonmichael/hledger#2157 and from #haskell-stack:matrix.org.

What is failing ?

Something is giving an error similar to setupTerm: Couldn't look up terminfo entry "unknown" when building or running hledger-web's test suite. See this comment.

What could explain hledger-web's test suite, and only hledger-web's, failing with a terminal-related error ?

  • 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.
  • hledger-ui doesn't have a test suite and hledger-lib's test suite is currently disabled in stackage. Among the hledger packages, that leaves hledger and hledger-web.
  • Among the hledger packages, hledger-web's test suite is the only one using hspec.
  • Among all stackage nightly packages, hledger-web and sydtest-yesod are the only ones using yesod-test. (sydtest-yesod's test suite is also disabled, for a different reason.)

More notes

@juhp
Copy link
Contributor

juhp commented May 14, 2024

It is possible we should update from libncurses5-dev to libncurses-dev (v6)?
Though the former also ought to still work..

@juhp
Copy link
Contributor

juhp commented May 14, 2024

It is possible we should update from libncurses5-dev to libncurses-dev (v6)? Though the former also ought to still work..

I made this change now so future nightly snapshots should have "libtinfo6-dev" in line with ghc-tinfo6 bindists.
So let's hope that helps and doesn't break current stackage binary build output too much ;-)

@simonmichael simonmichael marked this pull request as ready for review May 14, 2024 17:14
@simonmichael
Copy link
Contributor Author

Thanks! 🤞🏻 I have undrafted this PR so feel free to merge when it's ready to re-test.

@simonmichael simonmichael changed the title WIP: re-enable hledger-web tests, for troubleshooting terminfo error WIP: re-enable hledger-web tests / troubleshoot terminfo error May 14, 2024
@simonmichael simonmichael changed the title WIP: re-enable hledger-web tests / troubleshoot terminfo error re-enable hledger-web tests / troubleshoot terminfo error May 14, 2024
@simonmichael
Copy link
Contributor Author

PS is libncurses5-dev equivalent to terminfo or libtinfo-dev ? I'm not sure. I know at least the last one fixes certain builds on certain ubuntu versions.

@juhp
Copy link
Contributor

juhp commented May 15, 2024

https://packages.ubuntu.com/search?keywords=libtinfo-dev

(libtinfo is a library provided by ncurses)

@ysangkok
Copy link
Contributor

I disabled hledger-web in #7421 because wai-handler-launch isn't updated to warp-3.4 yet. But I've made a PR for that:

@alaendle alaendle merged commit 66e87fc into commercialhaskell:master May 22, 2024
1 check passed
@simonmichael
Copy link
Contributor Author

Unfortunately the situation remains unchanged

Thanks for trying, @juhp & @alaendle. I'm not too docker-equipped and not able to troubleshoot the curator's environment further myself; so while I'd prefer not to need special handling for hledger-web in stackage, I'll leave the tests disabled for now.

alaendle added a commit that referenced this pull request May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants