Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Fix liftToIntegration exception handling and rename

オープン
#6,567 コメント 4 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@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
平均マージ
2日 14時間
マージ済み PR(30日)
20

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IntersectMBO/cardano-node のほかの issue

IntersectMBO/cardano-node の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。