-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forge coverage does not use same settings as forge build #4921
Comments
I did try manually passing the option via "forge coverage --via-ir", same error. Also just to confirm, "forge test" works fine with no issue as per "forge build". |
Duplicate of #3527 (comment). Also, see the discussion in #3978. |
If you want |
Thanks for the tip @PaulRBerg. Refactored a bit and I managed to get coverage now. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (db96393 2023-05-11T00:10:51.773583000Z)
What command(s) is the bug in?
forge coverage
Operating System
macOS (Apple Silicon)
Describe the bug
➜ forge git:(master) ✗ forge build
[⠆] Compiling...
[⠒] Compiling 26 files with 0.8.19
[⠰] Solc 0.8.19 finished in 10.18s
Compiler run successful!
➜ forge git:(master) ✗ forge coverage
[⠢] Compiling...
[⠒] Compiling 26 files with 0.8.19
[⠑] Solc 0.8.19 finished in 1.37s
Error:
Compiler run failed:
Error: Unimplemented feature (/solidity/libsolidity/codegen/ArrayUtils.cpp:228):Copying of type struct MyStruct memory[] memory to storage not yet supported.
Expected behavior: same successful compilation as with "forge build" as "forge coverage" should use the same settings (like "forge test" who does run fine).
Actual behavior: getting an "unimplemented feature" error.
Note that I do the get the same compilation error with "forge build" if I remove "via_ir = true" from my foundry.toml file, so I guess some build settings are not passed consistently to coverage build.
The text was updated successfully, but these errors were encountered: