wz1000 / HieDb

Generates a references DB from .hie files
BSD 3-Clause "New" or "Revised" License
64 stars 24 forks source link

Test failure on GHC 9.8 #74

Open roberth opened 6 months ago

roberth commented 6 months ago

We've encountered a test failure when building and testing on GHC 9.8.1:

The failures seem quite innocent, if the change from Symbol:c:: to Symbol:c: is acceptable.

Failures:

  test/Main.hs:323:15: 
  1) hiedb, Command line, point-info, gives information about symbol at specified location
       expected: Span: test/data/Sub/Module2.hs:11:7-23
                 Constructors: {(ConDeclH98, ConDecl)}
                 Identifiers:
                 Symbol:c::Data1Constructor1:Sub.Module2:main
                 Data1Constructor1 defined at test/data/Sub/Module2.hs:11:7-23
                     Details:  Nothing {declaration of constructor bound at: test/data/Sub/Module2.hs:11:7-23}
                 Types:

        but got: Span: test/data/Sub/Module2.hs:11:7-23
                 Constructors: {(ConDeclH98, ConDecl)}
                 Identifiers:
                 Symbol:c:Data1Constructor1:Sub.Module2:main
                 Data1Constructor1 defined at test/data/Sub/Module2.hs:11:7-23
                     Details:  Nothing {declaration of constructor bound at: test/data/Sub/Module2.hs:11:7-23}
                 Types:

  To rerun use: --match "/hiedb/Command line/point-info/gives information about symbol at specified location/" --seed 732459942

  test/Main.hs:323:15: 
  2) hiedb, Command line, point-info, correctly prints type signatures
       expected: Span: test/data/Module1.hs:10:8-11
                 Constructors: {(HsVar, HsExpr), (XExpr, HsExpr)}
                 Identifiers:
                 $dIntegral defined at <no location info>
                     Details:  Just Integral Int {usage of evidence variable}
                 Symbol:v::even:GHC.Real:base
                 even defined at <no location info>
                     Details:  Just forall a. Integral a => a -> Bool {usage}
                 Types:
                 @@ 3 lines omitted @@

        but got: Span: test/data/Module1.hs:10:8-11
                 Constructors: {(HsVar, HsExpr), (XExpr, HsExpr)}
                 Identifiers:
                 $dIntegral defined at <no location info>
                     Details:  Just Integral Int {usage of evidence variable}
                 Symbol:v:even:GHC.Real:base
                 even defined at <no location info>
                     Details:  Just forall a. Integral a => a -> Bool {usage}
                 Types:
                 @@ 3 lines omitted @@

  To rerun use: --match "/hiedb/Command line/point-info/correctly prints type signatures/" --seed 732459942
jhrcek commented 6 months ago

This is already fixed in hiedb 0.6.0.0

I believe the issue is that Show instance of Symbol was changed right before 0.5.0.1 was released (https://github.com/wz1000/HieDb/commit/6aba7448a8041e27e14b26fb54c7044e92081c43)

But the tests (and CI) was updated 2 commits after that (https://github.com/wz1000/HieDb/pull/59).