haskell / ghc-events

Library and tool for parsing .eventlog files from GHC
http://www.haskell.org/haskellwiki/ThreadScope
Other
33 stars 33 forks source link

Ensure that `ghc-events show` fails with an error on malformed events #86

Closed bgamari closed 2 years ago

bgamari commented 2 years ago

Previous ghc-events show would fail to report malformed events. Here we fix this by splitting up readEvents to offer:

readEvents' :: Header -> BL.ByteString -> [Either String Event]

Which gives the user access to event deserialisation errors.

Fixes #85.

AndreasPK commented 2 years ago

LGTM for what it's worth

bgamari commented 2 years ago

I have merged your fix and squashed.

maoe commented 2 years ago

Thanks!

maoe commented 2 years ago

Released https://hackage.haskell.org/package/ghc-events-0.18.0