npx hardhat coverage fails - stack too deep
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, solidity
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.3k
- Fork
- 510
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của smartcontractkit/hardhat-starter-kit
-
Best trading opportunityĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
-
Consider upgrading to ethers v6Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
smartcontractkit/hardhat-starter-kit#197 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
smartcontractkit/hardhat-starter-kit#188 · 1 bình luận ·
-
Duplicate definition of TransferCó thể làm lại được @andrejrakic đã nhận 970 ngày trước và không có pull request nào đang mở. Đang mở
smartcontractkit/hardhat-starter-kit#182 · 2 bình luận · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
smartcontractkit/hardhat-starter-kit#181 · 1 bình luận ·
Tất cả issue của smartcontractkit/hardhat-starter-kit
Issue tương tự
-
[ordering-review] workshop order graph: 1 confirmed ordering issue, cycles are false positivesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
githubnext/gh-aw-workshop#6247 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue type/ci
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 81/100
c-w-z/commit-decision-record#20 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: China en Vivo (CN)Đang mởchannels:add check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
web-platform-tests/wpt#65844 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JuliusBrussee/caveman#1606 ·
Maintainer thường phản hồi trong vòng 1 ngày