-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add test for compilation error capture #148
base: main
Are you sure you want to change the base?
Conversation
Looks like it works in |
Bisecting leads to 9df3041 If I revert that one it works again. |
Seems to pass with latest version, PTAL. |
Thanks! That commit is about configuring the logger, so it makes sense that this commit would affect whether the errors are captured or not. It does so in a shim, whose purpose is to allow the callers to run the same code regardless of the GHC version, while the implementation of the shim does something different depending on the GHC version. So it makes sense that the behaviour is different depending on the GHC version. But that commit message also says that it fixes using unsafeRunInterpreterWithArgs with And if so, do we understand why? The commit message explains exactly why the change fixes unsafeRunInterpreterWithArgs with |
Good news, we do have a test: https://github.com/haskell-hint/hint/blob/main/unit-tests/run-unit-tests.hs#L353 |
I see!
I don't propose reverting the commit since error capture works fine again for GHC9.4+, maybe I can make the test guarded to run only for 9+, since there's already a functionality to determine GHC version in a testsuite, would that work for you? I'm slowly grokking the hints codebase so I might help with some stuff since I'm using it quite a lot already, but I don't think supporting (or like backporting fixes like this) to old GHC versions is worth it. Might be related to #149 |
A test which prevents a regression for future GHC versions does seem better than no test at all, but I think it's worth trying to understand what is going on and finding a way to make the test pass on all supported GHC versions.
What about GHC9.2? Like I said, the implementation of the
I would thus expect the behaviour to be different for GHC9.2+, not GHC9.4+! If the behaviour indeed changes for GHC9.4+, then that makes the problem much more difficult, because we'll have to look in ghc's source code to figure out why the same
Please let me know if you have any questions! We could even setup a video call if you think that would be more helpful.
Yes please! I struggle to find the time to give hint the attention it deserves.
hint used to support much older versions of GHC, and support for older versions did get dropped over time in order to ease the maintenance burden. Currently the oldest supported GHC version is ghc-8.6.5, which was released in 2019. I think the standard in the Haskell community is 3 years, so I think hint should support ghc-9.0, which was released in 2021. I think you are suggesting that the oldest GHC we should support is ghc-9.4? That version was released in 2022, now 2 years ago, not that far away from the standard, so that might be fine. |
Looks like capturing compilation errors only works with some GHCs. Adding a test to try in CI.