mpickering / hs-speedscope

BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

Update hs-speedscope to newer GHCs #18

Open jasagredo opened 2 months ago

jasagredo commented 2 months ago

I was only able to compile hs-speedscope with GHC 8.10.7. Could it be updated to newer GHCs? Starting on 9.2.8 and higher I get this error:

Build log (
C:\Users\Javier\AppData\Local\cabal\logs\ghc-9.2.8\hs-speedscope-0.1.0.0-11d1e6fe4517b8d4fec3fabc941445fd9ec648e8.log
):
Preprocessing library for hs-speedscope-0.1.0.0...
Building library for hs-speedscope-0.1.0.0...
[1 of 2] Compiling Paths_hs_speedscope ( dist\build\autogen\Paths_hs_speedscope.hs, dist\build\Paths_hs_speedscope.o )
[2 of 2] Compiling HsSpeedscope     ( src\HsSpeedscope.hs, dist\build\HsSpeedscope.o )

src\HsSpeedscope.hs:76:63: error:
    • Couldn't match type ‘Text’ with ‘[Char]’
      Expected: String
        Actual: Text
    • In the first argument of ‘Just’, namely ‘pname’
      In the ‘prog_name’ field of a record
      In the expression: el {prog_name = Just pname}
   |
76 |         ProgramArgs _ (pname: _args) -> el { prog_name = Just pname }
   |                                                               ^^^^^

src\HsSpeedscope.hs:77:68: error:
    • Couldn't match type ‘Text’ with ‘[Char]’
      Expected: String
        Actual: Text
    • In the first argument of ‘parseIdent’, namely ‘rts_ident’
      In the ‘rts_version’ field of a record
      In the expression: el {rts_version = parseIdent rts_ident}
   |
77 |         RtsIdentifier _ rts_ident -> el { rts_version = parseIdent rts_ident }
   |                                                                    ^^^^^^^^^
Error: [Cabal-7125]
Failed to build hs-speedscope-0.1.0.0 (which is required by exe:hs-speedscope from hs-speedscope-0.1.0.0). See the build log above for details.
jasagredo commented 2 months ago

Oh, wait. It seems the issue is with the hs-speedscope on Hackage. If I clone the repo it seems to work. Perhaps a new version could be released?

And possibly a revision to the latest version to disable it for GHCs > 8.10