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

Enable Users to see Code Coverage on expaned code #49

Open
ksew1 opened this issue Sep 4, 2024 · 0 comments
Open

Enable Users to see Code Coverage on expaned code #49

ksew1 opened this issue Sep 4, 2024 · 0 comments
Labels
enhancement New feature or request Scarb Should be done in Scarb Starknet Foundry Should be done in Starknet Foundry

Comments

@ksew1
Copy link
Member

ksew1 commented Sep 4, 2024

We should allow users to run coverage on expanded code, especially to see coverage for macros that might contain conditional statements and thus can be not fully covered. We can approach this in three ways, ranked from the easiest to the most complicated:

Proposed Solutions:

  1. Ask users to run scarb expand on their own and input it to Cairo coverage

    • Changes Required: Only in Scarb
    • Description: Users will manually run scarb expand and then input the expanded code into Cairo coverage tool.
  2. Add --expand flag to Forge

    • Changes Required: In Scarb and Forge
    • Description: Forge will run scarb expand behind the scenes and then pass the output to Cairo-coverage. This process will be automated for the user.
  3. Change mappings in the compiler to also point to expanded lines

    • Changes Required: Needs more investigation
    • Description: Needs more investigation

Additional Requirements:

  • Inline Macro Expansion: Currently, Scarb does not expand inline macros. We need to implement this capability (Reference: Language Server Implementation).
@ksew1 ksew1 added enhancement New feature or request Starknet Foundry Should be done in Starknet Foundry Scarb Should be done in Scarb labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Scarb Should be done in Scarb Starknet Foundry Should be done in Starknet Foundry
Projects
None yet
Development

No branches or pull requests

1 participant