Skip to content
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

Should forge coverage skip libraries? #4654

Closed
2 tasks done
llllvvuu opened this issue Mar 27, 2023 · 0 comments · Fixed by #7510
Closed
2 tasks done

Should forge coverage skip libraries? #4654

llllvvuu opened this issue Mar 27, 2023 · 0 comments · Fixed by #7510
Labels
C-forge Command: forge Cmd-forge-coverage Command: forge coverage T-bug Type: bug

Comments

@llllvvuu
Copy link
Contributor

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (6c1eee9 2023-03-27T00:12:53.527941Z)

What command(s) is the bug in?

forge coverage

Operating System

macOS (Apple Silicon)

Describe the bug

It's quite alarming to see as the first thing, when code is fully fuzzed and tests are passing:

| File                          | % Lines      | % Statements | % Branches   | % Funcs     |
|-------------------------------|--------------|--------------|--------------|-------------|
| library.sol | 0.00% (0/42) | 0.00% (0/54) | 0.00% (0/28) | 0.00% (0/4) |
| Total                         | 0.00% (0/42) | 0.00% (0/54) | 0.00% (0/28) | 0.00% (0/4) |

Developer has to turn on RUST_LOG=warn and dig back to this: #2504 , to find out that forge coverage doesn't work with libraries.

Maybe the above example should show (0/0) throughout the library.sol row and have another row above "Total" saying "Skipped" that would have the original 0.00% (0/42) | 0.00% (0/54) | 0.00% (0/28) | 0.00% (0/4)

@llllvvuu llllvvuu added the T-bug Type: bug label Mar 27, 2023
@mds1 mds1 added C-forge Command: forge Cmd-forge-coverage Command: forge coverage labels Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge Cmd-forge-coverage Command: forge coverage T-bug Type: bug
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants