software-mansion / software-mansion/cairo-coverage
Enable Users to see Code Coverage on expaned code
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22
- Forks
- 4
- Avg merge
- 8h 12m
- Merged PRs (30d)
- 4
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 expandon their own and input it to Cairo coverage- Changes Required: Only in Scarb
- Description: Users will manually run
scarb expandand then input the expanded code into Cairo coverage tool.
-
Add
--expandflag to Forge- Changes Required: In Scarb and Forge
- Description: Forge will run
scarb expandbehind 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).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the three proposed approaches across Scarb, Forge, and Cairo coverage. Read the referenced cairo-lang-language-server/src/ide/macros/expand.rs implementation, then investigate how Scarb handles inline macro expansion. Done means selecting and implementing a concrete approach that lets coverage report expanded code, including conditional macro branches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100