haskell / ghc-events

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

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

Closed bgamari closed 1 year 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 1 year ago

I have merged your fix and squashed.

maoe commented 1 year ago

Thanks!

maoe commented 1 year ago

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