-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requestscarbShould be done in ScarbShould be done in Scarbstarknet foundryShould be done in Starknet FoundryShould be done in Starknet Foundry
Description
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:
-
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.
-
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.
-
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).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestscarbShould be done in ScarbShould be done in Scarbstarknet foundryShould be done in Starknet FoundryShould be done in Starknet Foundry