software-mansion / software-mansion/cairo-debugger

Add `test` and `debug` profiles in Scarb

Open
#126 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
7
Forks
2
Avg merge
5d 2h
Merged PRs (30d)
1

Description

It is mostly for convenience.

  1. debug profile - name TBD
    TODO: debug profile should have all the things debugger needs turned on by default (e.g. skip-optimizations = true). We can make it a default profile used by snforge test --launch-debugger - mind that it would require changes in debug lenses logic in LS. Feel free to create appropriate follow-up tasks after taking on this issue.
    Effect: better UX when using debugger.

  2. test profile
    TODO:test profile should have the same settings as dev but with sierra-replace-ids = false. It would serve the same function as in Cargo. Then we can make test targets in scarb respect sierra-replace-ids - currently it has it hardcoded to false. Rationale for hardcoding it to false was that tests in projects such as garaga would crash with OOM if sierra-replace-ids = true was respected (which is the default for dev profile).
    Effect: better devX for cairo-debugger developers (ability to obtain human readable sierra in tests)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Scarb's existing profile configuration and scarb/src/compiler/compilers/test.rs, where sierra-replace-ids is currently hardcoded to false. Read the debug lenses logic in the language server before deciding how the debug profile should be wired in. Done means test and debug profiles have the specified behavior and test targets respect the test profile setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.