Closed as not planned
Description
When running forge coverage
, it builds differently than running forge build
(seems like does not use any of the configuration provided in foundry.toml that is used by forge build
).
forge coverage fails (due to no via-ir
flag set):
>>> forge coverage --report lcov --root ./contracts
[⠒] Compiling...
[⠑] Compiling 112 files with 0.8.21
[⠃] Solc 0.8.21 finished in 2.68s
Error:
Compiler run failed:
Error: Compiler error (/solidity/libsolidity/codegen/LValue.cpp:56):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.
forge build success using via-ir = true
from foundry.toml:
>>> forge build --root ./contracts
[⠢] Compiling...
[⠰] Compiling 3 files with 0.8.21
[⠔] Solc 0.8.21 finished in 32.61s
Compiler run successful with warnings:
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done