Soostone / katip

A structured logging framework for Haskell
205 stars 69 forks source link

Test failure on ghc 9.10 #155

Open eldritch-cookie opened 1 month ago

eldritch-cookie commented 1 month ago

katip-testsuite.log

MichaelXavier commented 1 month ago

Can you try this with 0.8.8.2? I tried running the test suite a few dozeN times and it didn't fail. The test log didn't have a seed value or anything so I don't know how to reproduce this.

eldritch-cookie commented 1 month ago

yes i can run the testsuite on 0.8.8.2 it fails again katip-0.8.8.2-build.log the test that failed is the one on line 163 https://github.com/Soostone/katip/blob/af85a1fdd39b132feb353db12080a8f59476a971/katip/test/Katip/Tests.hs#L163 not a quickcheck test, the error is a call to head so it probably is caused by https://github.com/Soostone/katip/blob/af85a1fdd39b132feb353db12080a8f59476a971/katip/test/Katip/Tests.hs#L168 but i have no idea why loggedItems is an empty list.

9999years commented 3 weeks ago

Comes from here:

https://github.com/Soostone/katip/blob/af85a1fdd39b132feb353db12080a8f59476a971/katip/src/Katip/Core.hs#L1155

9999years commented 3 weeks ago

Cabal changed the package names, which getLoc uses to filter out katip traces. With cabal-3.12:

       name   | srcLocPackage
entry: getLoc | katip-0.8.8.2-inplace
entry: logLocM | katip-0.8.8.2-inplace-test

With cabal-3.10:

entry: getLoc | katip-0.8.8.2-inplace
entry: logLocM | main

It's actually not related to 9.10 at all, you can reproduce on 9.8 with Cabal 3.12 or have tests pass on 9.10 with Cabal 3.10...

MichaelXavier commented 2 weeks ago

@9999years Do you understand the issue well enough to write up a fix? I'd be more than happy to merge and release it but I don't have much time to chase this down.

9999years commented 17 hours ago

@MichaelXavier I think factoring the tests out into a separate package whose name doesn't start with katip- would work.