npx hardhat coverage fails - stack too deep
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, solidity
- 領域
- testing-qa
調査の方向性
Reproduce the failure with npm install followed by npx hardhat coverage --show-stack-traces, then inspect .solcover.js and the coverage configuration around the reported stack-too-deep error. Compare the existing viaIR, exclusion, and @skip-on-coverage attempts. Done means coverage completes successfully for the intended Solidity files.
索引モデルが issue の本文から書いたものです。
説明
npx hardhat coverage --show-stack-traces
Version
=======
> solidity-coverage: v0.8.12
Instrumenting for coverage...
=============================
> APIConsumer.sol
> AutomationCounter.sol
> PriceConsumerV3.sol
> RandomNumberConsumerV2Plus.sol
> RandomNumberDirectFundingConsumerV2Plus.sol
> test/VRFCoordinatorV2_5Mock.sol
> VRFV2PlusWrapper.sol
Coverage skipped for:
=====================
> test/fuzzing/AutomationCounterEchidnaTest.sol
> test/MockLinkToken.sol
> test/MockOracle.sol
> test/MockV3Aggregator.sol
Compilation:
============
CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. When compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack. Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
after checking out, npm install, npx hardhat compile, npx hardhat test, I am trying to get the code coverage.
It fails with stack too deep. In order to solve the above issue, I tinkered around with
- enabling the via-ir flag
- excluding more/all of the .sol files in .solcover.js
- adding a @skip-on-coverage to the test definitions (
it("testname [ @skip-on-coverage ]", async () => {}))
but with none of those i was able to get code coverage running
Any hint is appreciated to help me understand how to get code coverage for the code to run.
- 主要言語
- JavaScript
- スター
- 1.3k
- フォーク
- 510
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
smartcontractkit/hardhat-starter-kit のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 1/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
smartcontractkit/hardhat-starter-kit#197 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
smartcontractkit/hardhat-starter-kit#188 · コメント 1 件 ·
-
Duplicate definition of Transfer再び着手できるかも @andrejrakic が 970 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
smartcontractkit/hardhat-starter-kit#182 · コメント 2 件 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
smartcontractkit/hardhat-starter-kit#181 · コメント 1 件 ·
smartcontractkit/hardhat-starter-kit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
githubnext/gh-aw-workshop#6247 ·
メンテナーはふだん 1 日以内に返信
-
good first issue type/ci
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
c-w-z/commit-decision-record#20 ·
メンテナーはふだん 1 日以内に返信
-
channels:add check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
web-platform-tests/wpt#65844 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliusBrussee/caveman#1606 ·
メンテナーはふだん 1 日以内に返信