haskell / haskell/hackage-security

A couple spots async exceptions aren't handled gracefully

Open
#187 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
63
Forks
56
PR merge metrics
No merged PRs in 30d

Description

Based on https://github.com/commercialhaskell/stack/issues/3073 , I suspected hackage-security wasn't handling async exceptions quite right. Indeed, a search for SomeException led me to find the following spots where SomeException gets caught and not rethrown:

Relevant to the linked issue:

https://github.com/haskell/hackage-security/blob/226e1e43ba1b9ac34cab6b1564604b86b50e9129/hackage-security/src/Hackage/Security/Client/Repository/Remote.hs#L278

Part of hackage-repo-tool:

https://github.com/haskell/hackage-security/blob/226e1e43ba1b9ac34cab6b1564604b86b50e9129/hackage-repo-tool/src/Hackage/Security/RepoTool/Util/IO.hs#L84

I also noticed that the UpdateFailed exception constructor is never used - https://github.com/haskell/hackage-security/blob/226e1e43ba1b9ac34cab6b1564604b86b50e9129/hackage-security/src/Hackage/Security/Client/Repository.hs#L336

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.