Fix liftToIntegration exception handling and rename
维护者通常 2 天内回复
@palas 已经在做这个了。
开始于 2026年5月8日。
评估
这个 Issue 还没有评估数据。
描述
Problem
liftToIntegration in cardano-testnet/src/Testnet/Start/Cardano.hs:104 has two issues:
1. Duplicate exception messages
The current exception handler chain:
catch @_ @SomeException (runRIO rMap r) (withFrozenCallStack $ failException . toException . stringException . displayException)
serializes the exception to a string via displayException, then wraps it in a new StringException (which captures its own callstack), then passes that to failException (which calls displayException again). This produces output like:
━━━ Exception (StringException) ━━━
UnliftIO.Exception.throwString called with:
! AnnotatedException !
Underlying exception type: StringException
UnliftIO.Exception.throwString called with:
<actual error message>
Called from: ...
CallStack (from HasCallStack): ...
Called from: ...
The error message and callstack appear twice, and the exception type banners are nested three levels deep.
Fix: replace the chain with just failException, which already accepts SomeException:
catch @_ @SomeException (runRIO rMap r) (withFrozenCallStack failException)
2. Unclear name
liftToIntegration doesn't convey what is being lifted from/to. A name like runRIOInIntegration would be clearer — it runs a RIO ResourceMap action inside Hedgehog's Integration monad.
Context
Originally flagged as tech debt from https://github.com/IntersectMBO/cardano-node/pull/6346 (unresolved comments by @carbolymer), revisited in https://github.com/IntersectMBO/cardano-node/pull/6559#discussion_r3200025726.
- 主要语言
- Haskell
- 星标
- 3.2k
- 派生
- 763
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 22
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
IntersectMBO/cardano-node 的其他 Issue
-
Stale
难度 1/5 1-3 小时 新手友好度 75/100
IntersectMBO/cardano-node#6597 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
IntersectMBO/cardano-node#6522 · 3 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
IntersectMBO/cardano-node#6755 · 1 条评论 ·
维护者通常 2 天内回复
-
Dijkstra PV12 needs triage type: regression
难度 5/5 一周以上 新手友好度 12/100
IntersectMBO/cardano-node#6748 ·
维护者通常 2 天内回复
-
[cardano-testnet] Enhancements for status command可能已有人在做 @palas 于 6 天前认领。 未关闭
IntersectMBO/cardano-node#6747 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 IntersectMBO/cardano-node 的全部 Issue
相似的 Issue
-
Web.Scotty.Trans.Lazy.setHeader calls addHeader instead of setHeader可能已有人在做 @tusharad 于 1 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
scotty-web/scotty#436 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
input-output-hk/haskell.nix#2617 ·
-
easy first-contributor first-contributors good first issue haskell help wanted up-for-grabs
难度 1/5 1 小时以内 新手友好度 82/100
fork-commit-merge/fork-commit-merge#8455 ·
维护者通常 1 天内回复
-
new tool
难度 2/5 1-3 小时 新手友好度 62/100
dense-analysis/ale#5176 ·
-
infrastructure
难度 2/5 1-3 小时 新手友好度 78/100
alunduil/siren-json.hs#278 ·
维护者通常 1 天内回复