-
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
feat: support --via-ir
flag when running forge coverage
#3527
Comments
Looks like |
this is unfortunately a limitation, because --via-ir transforms the AST so there is no good way of keeping track afterwards. |
Shoot... Is there a way around this? I'm worried that this feature would be bricked once solidity moves to the IR pipeline. |
I've been having this same error without using |
we should make this clearer on the website. |
Is the need for tracking AST isolated to the test contracts? Or does it apply to the primary source code as well? |
I'm facing the same issue. Having this limitation in mind, do we have any alternative to see test coverage when getting |
@mattsse what do you mean by "website"? The Foundry Book? Because if yes, I don't see any documentation about coverage on there. I am not sufficiently experienced with test coverage software to understand why it is difficult (or impossible) to run coverage over IR-optimized code, but I agree with the commend made by @colinnielsen above - if coverage is not made to work with IR, it will not be as popular as it could be. |
My code compile without
|
This is an annoying error and probably will be a big blocker for Foundry adoption.Also, how to get more output from the CLI command, it does not show to me where the stack too deep error exactly is:
|
i have the exact same issue |
Hi, I have the exact same issue, is this fix planned? |
Same issue here |
Do we have any workarounds for this issue yet? |
|
I also had to replace all my |
@sanbir To confirm, your assembly blocks are in fact memory safe before you add the annotation? |
forge coverage
--via-ir
flag is ignored when running forge coverage
--via-ir
flag is ignored when running forge coverage
--via-ir
flag when running forge coverage
Looks like this is a current limitation of |
forge coverage --ir-minimum is runnning with some limitations on --via-ir. we can use --ir-minimum as an alternate for sometime |
anyone facing memory leaks with
forge 0.2.0 (ea3ba89 2024-09-05T00:20:31.915792582Z) logs:
|
|
--ir-minimum for me fails with |
|
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (d896050 2022-10-21T00:08:06.615745Z)
What command(s) is the bug in?
forge coverage --via-ir --report lcov
Operating System
macOS (Apple Silicon)
Describe the bug
Looks like
COMPILER OPTIONS
are listed whenforge coverage -h
is run, however it appears that the coverage command does not build through the YUL pipeline.The text was updated successfully, but these errors were encountered: