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

flow test prints unreadable output

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

@holyfuchs がすでに取り組んでいます。

2026年4月17日 から。

  • #2332 @holyfuchs による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
go
領域
cli, testing

調査の方向性

まず、cadence/tests/yield_vaults_strategy_vault_test.cdc に示されているデプロイ順序の失敗シナリオで flow test を実行し、次に helpers/deployment_helpers.cdc:52 の報告された箇所を追跡します。テストの失敗時に、エスケープされた内部 Cadence ラッパーや過剰なパディング、読みにくい生のエラー出力が出力されなくなれば作業は完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

When a Cadence test deploys contracts in the wrong dependency order or similar issues, flow test prints hundreds of lines of raw, unformatted output that is nearly impossible to read and lags the terminal.

Current Behavior

The CLI outputs the full internal Cadence representation of the error, including the I.Test.Test.Error(message: "...") wrapper with all nested error chains encoded as an escaped string. Every line of the output is also padded with trailing spaces to a fixed column width. Example:

flow test
❌ Command Error: error in test file "cadence/tests/yield_vaults_strategy_vault_test.cdc": Execution failed:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
error: assertion failed: given value is: I.Test.Test.Error(message: "[Error Code: 1101] error caused by: 1 error occurred:\n\t* transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed:\nerror: cannot deploy invalid contract\n --> 69f412eecfa8b27d65c15b19943ed0d8a00b87d89ca7e7fabb309dc13b400084:5:20\n  |\n5 |                     signer.contracts.add(name: \"FlowYieldVaultsInterfaces\", code: \"696d706f72742046756e6769626c65546f6b656e2066726f6d203078303030303030303030303030303030320a696d706f727420466c6f77416374696f6e732066726f6d203078303030303030303030303030303030370a0a61636365737328616c6c2920636f6e747261637420466c6f775969656c645661756c7473496e7465726661636573207b0a0a2020202061636365737328616c6c292073747275637420696e74657266616365205374726174656779207b0a202020202020202061636365737328616c6c292066756e20637... \n  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nerror: cannot find declaration `FlowActions` in `0000000000000007.FlowActions`\n --> 0000000000000007.FlowYieldVaultsInterfaces:2:7\n  |\n2 | import FlowActions from 0x0000000000000007\n  |        ^^^^^^^^^^^ available exported declarations are:\n\n\n  See documentation at: https://cadence-lang.org/docs/language/imports\n\nWas this error unhelpful?\nConsider suggesting an improvement here: https://github.com/onflow/cadence/issues.\n\n\n")
  --> helpers/deployment_helpers.cdc:52:4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
Was this error unhelpful?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
Consider suggesting an improvement here: https://github.com/onflow/cadence/issues.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        


  • thousands of whitespaces, which need text wrapping lagging the terminal
    The output frequently exceeds 200 lines for a single assertion failure.

Expected Behavior

The CLI should display only the actionable Cadence errors (compiler/checker errors, type errors, etc.) with their source locations, without the [Error Code: 1101] transaction wrapper, the cannot deploy invalid contract outer block, or the raw I.Test.Test.Error(message: "...") encoding. Example:

❌ Test Error: cadence/tests/yield_vaults_test.cdc
Assertion failed at: helpers/deployment_helpers.cdc:55:4

error: cannot find declaration `FlowYieldVaults` in `0000000000000007.FlowYieldVaults`
 --> 0000000000000007.FlowYieldVaultsAdmin:1:7

error: ambiguous intersection type
  --> 0000000000000007.FlowYieldVaultsAdmin:23:62

Steps to Reproduce

  1. Write 2 contracts
  2. A includes B
  3. deploy A
主要言語
Go
スター
209
フォーク
88
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

onflow/flow-cli のほかの issue

onflow/flow-cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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